From 1c31ee4c7240e192fc933c934bb05ea50537bedd Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Fri, 24 Feb 2017 12:26:00 -0500 Subject: Add details about dpkg_statoverride to README Fix 'ressources' typo --- README.md | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 9405bd8..4aa2cc0 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,8 @@ * [apt::key](#apt-key) * [`apt::key::plain`](#apt-key-plain) * [apt::upgrade_package](#apt-upgrade_package) -* [Resources](#ressources) + * [apt::dpkg_statoverride](#apt-dpkg_statoverride) +* [Resources](#resources) * [File\['apt_config'\]](#fileapt_config) * [Exec\['apt_updated'\]](#execapt_updated) * [Tests](#tests) @@ -602,7 +603,36 @@ to their latest (also, only if they are installed): } -# Resources +## apt::dpkg_statoverride + +Override ownership and mode of files. This define takes the following parameters: + +[*name*] + Implicit parameter. + File path. + +[*user*] + User name (or user id if prepended with '#'). + +[*group*] + Group name (or group id if prepended with '#'). + +[*mode*] + File mode, in octal + +[*ensure*] + Whether to add or delete this configuration + + +Example usage: + + apt::dpkg_statoverride { '/var/log/puppet': + user => 'puppet', + group => 'puppet', + mode => '750', + } + +# Resources ## File['apt_config'] -- cgit v1.2.3 From dfbfc7a05f7ac6713b4ac1379cfb6e2cefa85093 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Fri, 24 Feb 2017 13:03:59 -0500 Subject: rename preseeded_package into package keep a wrapper in place with a deprecation notice for the old name so that ppl can know about the change and migrate to the new name --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 9405bd8..49110ba 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ * [Defines](#defines) * [apt::apt_conf](#apt-apt_conf) * [apt::preferences_snippet](#apt-preferences_snippet) - * [apt::preseeded_package](#apt-preseeded_package) + * [apt::package](#apt-package) * [apt::sources_list](#apt-sources_list) * [apt::key](#apt-key) * [`apt::key::plain`](#apt-key-plain) @@ -155,6 +155,9 @@ Ubuntu support is lagging behind but not absent either. port => '666'; } + * the `apt::preseeded_package` defined type was renamed `apt::package` the + previous name is now deprecated and will be removed in the future. + # Requirements @@ -505,7 +508,7 @@ From apt_preferences(5): characters - otherwise they will be silently ignored. -## apt::preseeded_package +## apt::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 @@ -513,12 +516,12 @@ 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: } + apt::package { locales: } You can also specify the content of the seed via the content parameter, for example: - apt::preseeded_package { 'apticron': + apt::package { 'apticron': content => 'apticron apticron/notification string root@example.com', } -- cgit v1.2.3 From 7687c41a759f8a138a51f922b19d6ab4149df950 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Fri, 24 Feb 2017 17:01:05 -0500 Subject: Adjust README to show new parameter that's needed for preseeding. --- README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 49110ba..eb83437 100644 --- a/README.md +++ b/README.md @@ -511,18 +511,25 @@ From apt_preferences(5): ## apt::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 +answers to debconf. To use preseeding you need to set the `use_seed` parameter +to true. 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::package { locales: } + apt::package { 'locales': + use_seed => true, + } + +You can change what template is used by setting `seedfile_template` to a +template path (same as you would pass to the template() function). -You can also specify the content of the seed via the content parameter, -for example: +You can also specify the content of the seed via the content parameter instead +of using a template, for example: apt::package { 'apticron': - content => 'apticron apticron/notification string root@example.com', + use_seed => true, + content => 'apticron apticron/notification string root@example.com', } -- cgit v1.2.3 From cd84a163d068e5dd368731b51f6934495a30313c Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Fri, 24 Feb 2017 17:09:27 -0500 Subject: README: document new pin/pin_priority parameters to apt::package --- README.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index eb83437..fd9f587 100644 --- a/README.md +++ b/README.md @@ -511,9 +511,11 @@ From apt_preferences(5): ## apt::package This simplifies installation of packages for which you wish to preseed the -answers to debconf. To use preseeding you need to set the `use_seed` parameter -to true. For example, if you wish to provide a preseed file for the locales -package, you would place the `locales.seed` file in +answers to debconf or pin to a certain version. + +To use preseeding you need to set the `use_seed` parameter to true. 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: @@ -532,6 +534,18 @@ of using a template, for example: content => 'apticron apticron/notification string root@example.com', } +To pin a package to a certain release or version, you need to set the `pin` +parameter to the restriction that you want (this value corresponds to the +'Pin:' line in preferences files). For example this would pin the package +ganeti to the jessie release: + + apt::package { 'ganeti': + pin => 'release o=Debian Backports,a=jessie', + } + +Also, if you want to set a priority number to a package pin, you can set +`pin_priority` to an integer value. The default value of this parameter is +1000, which will install but not downgrade a package. ## apt::sources_list -- cgit v1.2.3 From 416103f0625d67cb4056fe1d92775d1685966799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 24 Feb 2017 17:49:27 -0500 Subject: update the README with the new preferences.d behavior --- README.md | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 4aa2cc0..32c86db 100644 --- a/README.md +++ b/README.md @@ -253,25 +253,19 @@ Example usage: If this variable is set the default repositories list ("main contrib non-free") is overriden. -### custom_preferences +### manage_preferences - For historical reasons (Debian Lenny's version of APT did not support the use - of the `preferences.d` directory for putting fragments of 'preferences'), this - module will manage a default generic apt/preferences file with more - recent releases pinned to very low values so that any package - installation will not accidentally pull in packages from those suites - unless you explicitly specify the version number. This file will be - complemented with all of the preferences_snippet calls (see below). + Setting this variable to `false` will delete all the files in `preferences.d` + managed by Puppet. By default, this parameter is set to `true`. - If the default preferences template doesn't suit your needs, you can create a - template located in your `site_apt` module, and set custom_preferences with the - content (eg. custom_preferences => template('site_apt/preferences') ) +### custom_preferences - Setting this variable to false before including this class will force the - `apt/preferences` file to be absent: + If the default preferences template doesn't suit your needs, you can create a + template located in your `apt` module, and set `custom_preferences` to your + preferred template: class { 'apt': - custom_preferences => false, + custom_preferences => 'apt/my_super_template.erb', } ### custom_sources_list -- cgit v1.2.3 From d24b79310523e4823214d6b52883f0f4debc56af Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sun, 16 Apr 2017 21:19:49 -0400 Subject: README: missing sentence end in deprecation notice for preseeded_package The missing dot made the announcement confusing. There are really two different informations in there that should be split. --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index fd9f587..aac4a8e 100644 --- a/README.md +++ b/README.md @@ -155,8 +155,9 @@ Ubuntu support is lagging behind but not absent either. port => '666'; } - * the `apt::preseeded_package` defined type was renamed `apt::package` the - previous name is now deprecated and will be removed in the future. + * the `apt::preseeded_package` defined + type was renamed `apt::package`. the previous name is now deprecated and + will be removed in the future. # Requirements -- cgit v1.2.3 From bbf4bc03fa076ae3984d8eae18e27fd09627f177 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sun, 16 Apr 2017 21:29:30 -0400 Subject: package wrongly documented and used with content parameter There are some references to the old `content` parameter (from preseeded_package) that mistakenly weren't replaced with the new parameter `seedfile_content`. This meant the documentation was wrong and the `preseeded_package` wrapper was erroring out because of an unknown parameter. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index aac4a8e..944044b 100644 --- a/README.md +++ b/README.md @@ -527,12 +527,12 @@ following in your manifest: You can change what template is used by setting `seedfile_template` to a template path (same as you would pass to the template() function). -You can also specify the content of the seed via the content parameter instead -of using a template, for example: +You can also specify the content of the seed via the `seedfile_content` +parameter instead of using a template, for example: apt::package { 'apticron': use_seed => true, - content => 'apticron apticron/notification string root@example.com', + seedfile_content => 'apticron apticron/notification string root@example.com', } To pin a package to a certain release or version, you need to set the `pin` -- cgit v1.2.3 From 9a4adac94a72d8bd8c3d5b4657adac15f43ecd30 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sun, 16 Apr 2017 21:31:50 -0400 Subject: README: slightly reword template usage for apt::package The current wording is not super clear on what type of file should be dropped in `site_apt/...`. --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 944044b..3343393 100644 --- a/README.md +++ b/README.md @@ -515,7 +515,7 @@ This simplifies installation of packages for which you wish to preseed the answers to debconf or pin to a certain version. To use preseeding you need to set the `use_seed` parameter to true. For -example, if you wish to provide a preseed file for the locales package, you +example, if you wish to provide a preseed template 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: @@ -525,7 +525,8 @@ following in your manifest: } You can change what template is used by setting `seedfile_template` to a -template path (same as you would pass to the template() function). +template path of your choosing (same as you would pass to the template() +function). You can also specify the content of the seed via the `seedfile_content` parameter instead of using a template, for example: -- cgit v1.2.3