From e15283b781f35779a75415725cd315104879aa67 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 7 Dec 2010 13:18:41 -0500 Subject: format standardization --- manifests/preseeded_package.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/preseeded_package.pp') diff --git a/manifests/preseeded_package.pp b/manifests/preseeded_package.pp index 76c432e..8f3bcbd 100644 --- a/manifests/preseeded_package.pp +++ b/manifests/preseeded_package.pp @@ -5,7 +5,7 @@ define apt::preseeded_package ($content = "", $ensure = "installed") { default => $content } - file{ $seedfile: + file { $seedfile: content => $real_content, mode => 0600, owner => root, group => root, } -- cgit v1.2.3 From dd0552dce13f123dc05c5600232216f905c70f7b Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 7 Dec 2010 23:03:15 -0500 Subject: update apt::preseeded_package template sources to use $lsbdistcodename instead of $debian_release, also expand it to allow for site-apt sources --- README | 8 ++++---- manifests/preseeded_package.pp | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'manifests/preseeded_package.pp') diff --git a/README b/README index 406266a..7abb1ea 100644 --- a/README +++ b/README @@ -226,10 +226,10 @@ apt::preseeded_package ---------------------- This simplifies installation of packages for which you wish to preseed the -answers to debconf. For example, if you wish to provide a preseed file -for the locales package, you would place the locales.seed file in -'templates/$debian_version/locales.seeds' and then include the following -in your manifest: +answers to debconf. For example, if you wish to provide a preseed file for the +locales package, you would place the locales.seed file in +'site-apt/templates/$lsbdistcodename/locales.seeds' and then include the +following in your manifest: apt::preseeded_package { locales: } diff --git a/manifests/preseeded_package.pp b/manifests/preseeded_package.pp index 8f3bcbd..74aafa5 100644 --- a/manifests/preseeded_package.pp +++ b/manifests/preseeded_package.pp @@ -1,7 +1,9 @@ define apt::preseeded_package ($content = "", $ensure = "installed") { $seedfile = "/var/cache/local/preseeding/$name.seeds" $real_content = $content ? { - "" => template ( "$name.seeds", "$debian_version/$name.seeds" ), + "" => template ( "site-apt/$name.seeds", + "site-apt/$lsbdistcodename/$name.seeds", + "$name.seeds", "$lsbdistcodename/$name.seeds" ), default => $content } -- cgit v1.2.3 From 36c4873f87af74ba1ab9f780db2992c788ef925f Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 7 Dec 2010 23:57:25 -0500 Subject: multiple sources for templates are not allowed (see #1818), so revert it to a single source referenced by the README, and clarify the README to indicate how you can pass the preseed contents directly --- README | 8 ++++---- manifests/preseeded_package.pp | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'manifests/preseeded_package.pp') diff --git a/README b/README index 7abb1ea..109c92a 100644 --- a/README +++ b/README @@ -233,11 +233,11 @@ following in your manifest: apt::preseeded_package { locales: } -You can also specify 'content' to define this file via a template. Here's an -example for preseeding installation of the 'mysql' package with a template: +You can also specify the content of the seed via the content parameter, +for example: - apt::preseeded_package { "mysql": - content => template("site-apt/mysql.seed.erb"), + apt::preseeded_package { "apticron": + content => "apticron apticron/notification string root@example.com", } apt::sources_list diff --git a/manifests/preseeded_package.pp b/manifests/preseeded_package.pp index 74aafa5..42c6200 100644 --- a/manifests/preseeded_package.pp +++ b/manifests/preseeded_package.pp @@ -1,9 +1,7 @@ define apt::preseeded_package ($content = "", $ensure = "installed") { $seedfile = "/var/cache/local/preseeding/$name.seeds" $real_content = $content ? { - "" => template ( "site-apt/$name.seeds", - "site-apt/$lsbdistcodename/$name.seeds", - "$name.seeds", "$lsbdistcodename/$name.seeds" ), + "" => template ( "site-apt/$lsbdistcodename/$name.seeds" ) default => $content } -- cgit v1.2.3 From 72bb7b5ccb42bc9e32d191eb55e2fd8831abff68 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Wed, 8 Dec 2010 00:02:15 -0500 Subject: fix typo --- manifests/preseeded_package.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/preseeded_package.pp') diff --git a/manifests/preseeded_package.pp b/manifests/preseeded_package.pp index 42c6200..839f200 100644 --- a/manifests/preseeded_package.pp +++ b/manifests/preseeded_package.pp @@ -1,7 +1,7 @@ define apt::preseeded_package ($content = "", $ensure = "installed") { $seedfile = "/var/cache/local/preseeding/$name.seeds" $real_content = $content ? { - "" => template ( "site-apt/$lsbdistcodename/$name.seeds" ) + "" => template ( "site-apt/$lsbdistcodename/$name.seeds" ), default => $content } -- cgit v1.2.3