diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 97 |
1 files changed, 73 insertions, 24 deletions
@@ -19,12 +19,13 @@ * [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) * [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) @@ -155,6 +156,10 @@ Ubuntu support is lagging behind but not absent either. port => '666'; } + * <a name="apt-preseeded_package"></a>the `apt::preseeded_package` defined + type was renamed `apt::package`. the previous name is now deprecated and + will be removed in the future. + # Requirements<a name="requirements"></a> @@ -252,14 +257,10 @@ Example usage: If this variable is set the default repositories list ("main contrib non-free") is overriden. -### disable_update - - Disable "apt-get update" which is normally triggered by apt::upgrade_package - and apt::dist_upgrade. +### manage_preferences - Note that nodes can be updated once a day by using - APT::Periodic::Update-Package-Lists "1"; - in i.e. /etc/apt/apt.conf.d/80_apt_update_daily. + Setting this variable to `false` will delete all the files in `preferences.d` + managed by Puppet. By default, this parameter is set to `true`. ### custom_preferences @@ -272,14 +273,11 @@ Example usage: complemented with all of the preferences_snippet calls (see below). 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') ) - - Setting this variable to false before including this class will force the - `apt/preferences` file to be absent: + 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 @@ -514,23 +512,45 @@ From apt_preferences(5): characters - otherwise they will be silently ignored. -## apt::preseeded_package<a name="apt-preseeded_package"></a> +## apt::package<a name="apt-package"></a> 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 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 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: - apt::preseeded_package { locales: } + apt::package { 'locales': + use_seed => true, + } -You can also specify the content of the seed via the content parameter, -for example: +You can change what template is used by setting `seedfile_template` to a +template path of your choosing (same as you would pass to the template() +function). - apt::preseeded_package { 'apticron': - content => 'apticron apticron/notification string root@example.com', +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, + 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` +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<a name="apt-sources_list"></a> @@ -611,7 +631,36 @@ to their latest (also, only if they are installed): } -# Resources<a name="ressources"></a> +## apt::dpkg_statoverride<a name="apt-dpkg_statoverride"></a> + +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<a name="resources"></a> ## File['apt_config']<a name="file-apt-config"></a> |