use the same code indenting (Puppet's code guideline one) everywhere to uniform
This commit is contained in:
parent
ec3bceff10
commit
3abd96bb65
1 changed files with 89 additions and 40 deletions
129
README.md
129
README.md
|
@ -79,7 +79,11 @@ Ubuntu support is lagging behind but not absent either.
|
||||||
you will need to remove the variables, and the include and instead do
|
you will need to remove the variables, and the include and instead do
|
||||||
the following:
|
the following:
|
||||||
|
|
||||||
class { 'apt': debian_url => 'http://localhost:9999/debian/', use_next_release => true }
|
class {
|
||||||
|
'apt':
|
||||||
|
debian_url => 'http://localhost:9999/debian/',
|
||||||
|
use_next_release => true;
|
||||||
|
}
|
||||||
|
|
||||||
previously, you could manually set `$lsbdistcodename` which would enable forced
|
previously, you could manually set `$lsbdistcodename` which would enable forced
|
||||||
upgrades, but because this is a top-level facter variable, and newer puppet
|
upgrades, but because this is a top-level facter variable, and newer puppet
|
||||||
|
@ -90,7 +94,11 @@ Ubuntu support is lagging behind but not absent either.
|
||||||
you to trigger upgrades:
|
you to trigger upgrades:
|
||||||
|
|
||||||
include apt::dist_upgrade
|
include apt::dist_upgrade
|
||||||
class { 'apt': codename => 'wheezy', notify => Exec['apt_dist-upgrade'] }
|
class {
|
||||||
|
'apt':
|
||||||
|
codename => 'wheezy',
|
||||||
|
notify => Exec['apt_dist-upgrade'];
|
||||||
|
}
|
||||||
|
|
||||||
* the `apticron` class has been moved to a parameterized class. if you were
|
* the `apticron` class has been moved to a parameterized class. if you were
|
||||||
including this class before, you will need to move to instantiating the
|
including this class before, you will need to move to instantiating the
|
||||||
|
@ -104,7 +112,11 @@ Ubuntu support is lagging behind but not absent either.
|
||||||
you will need to remove the variables, and the include and instead do the
|
you will need to remove the variables, and the include and instead do the
|
||||||
following:
|
following:
|
||||||
|
|
||||||
class { 'apt::apticron': email => 'foo@example.com', notifynew => '1' }
|
class {
|
||||||
|
'apt::apticron':
|
||||||
|
email => 'foo@example.com',
|
||||||
|
notifynew => '1';
|
||||||
|
}
|
||||||
|
|
||||||
* the `apt::listchanges` class has been moved to a paramterized class. if you
|
* the `apt::listchanges` class has been moved to a paramterized class. if you
|
||||||
were including this class before, after passing some variables, you will need
|
were including this class before, after passing some variables, you will need
|
||||||
|
@ -118,7 +130,10 @@ Ubuntu support is lagging behind but not absent either.
|
||||||
you will need to remove the variables, and the include and instead do the
|
you will need to remove the variables, and the include and instead do the
|
||||||
following:
|
following:
|
||||||
|
|
||||||
class { 'apt::listchanges': email => 'foo@example.com' }
|
class {
|
||||||
|
'apt::listchanges':
|
||||||
|
email => 'foo@example.com';
|
||||||
|
}
|
||||||
|
|
||||||
* the `apt::proxy_client` class has been moved to a paramterized class. if you
|
* the `apt::proxy_client` class has been moved to a paramterized class. if you
|
||||||
were including this class before, after passing some variables, you will need
|
were including this class before, after passing some variables, you will need
|
||||||
|
@ -132,7 +147,11 @@ Ubuntu support is lagging behind but not absent either.
|
||||||
you will need to remove the variables, and the include and instead do the
|
you will need to remove the variables, and the include and instead do the
|
||||||
following:
|
following:
|
||||||
|
|
||||||
class { 'apt::proxy_client': proxy => 'http://proxy.domain', port => '666' }
|
class {
|
||||||
|
'apt::proxy_client':
|
||||||
|
proxy => 'http://proxy.domain',
|
||||||
|
port => '666';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Requirements<a name="requirements"></a>
|
# Requirements<a name="requirements"></a>
|
||||||
|
@ -175,9 +194,13 @@ that is not enabled by default, you must set one of the following parameters.
|
||||||
|
|
||||||
Example usage:
|
Example usage:
|
||||||
|
|
||||||
class { 'apt': use_next_release => true, debian_url => 'http://localhost:9999/debian/' }
|
class {
|
||||||
|
'apt':
|
||||||
|
use_next_release => true,
|
||||||
|
debian_url => 'http://localhost:9999/debian/';
|
||||||
|
}
|
||||||
|
|
||||||
Class parameters:
|
**Class parameters:**
|
||||||
|
|
||||||
### use_lts
|
### use_lts
|
||||||
|
|
||||||
|
@ -245,7 +268,10 @@ Class parameters:
|
||||||
Setting this variable to false before including this class will force the
|
Setting this variable to false before including this class will force the
|
||||||
`apt/preferences` file to be absent:
|
`apt/preferences` file to be absent:
|
||||||
|
|
||||||
class { 'apt': custom_preferences => false }
|
class {
|
||||||
|
'apt':
|
||||||
|
custom_preferences => false;
|
||||||
|
}
|
||||||
|
|
||||||
### custom_sources_list
|
### custom_sources_list
|
||||||
|
|
||||||
|
@ -257,7 +283,10 @@ Class parameters:
|
||||||
For example, setting this variable will pull in the
|
For example, setting this variable will pull in the
|
||||||
`templates/site_apt/sources.list` file:
|
`templates/site_apt/sources.list` file:
|
||||||
|
|
||||||
class { 'apt': custom_sources_list => template('site_apt/sources.list') }
|
class {
|
||||||
|
'apt':
|
||||||
|
custom_sources_list => template('site_apt/sources.list');
|
||||||
|
}
|
||||||
|
|
||||||
### custom_key_dir
|
### custom_key_dir
|
||||||
|
|
||||||
|
@ -289,7 +318,11 @@ defaults, which you are free to change:
|
||||||
|
|
||||||
Example usage:
|
Example usage:
|
||||||
|
|
||||||
class { 'apt::apticron': email => 'foo@example.com', notifynew => '1' }
|
class {
|
||||||
|
'apt::apticron':
|
||||||
|
email => 'foo@example.com',
|
||||||
|
notifynew => '1';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
## apt::cron::download<a name="apt-cron-download"></a>
|
## apt::cron::download<a name="apt-cron-download"></a>
|
||||||
|
@ -374,7 +407,10 @@ the following parameterized variables, which can be changed:
|
||||||
|
|
||||||
Example usage:
|
Example usage:
|
||||||
|
|
||||||
class { 'apt::listchanges': email => 'foo@example.com' }
|
class {
|
||||||
|
'apt::listchanges':
|
||||||
|
email => 'foo@example.com';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
## apt::proxy_client<a name="apt-proxy_client"></a>
|
## apt::proxy_client<a name="apt-proxy_client"></a>
|
||||||
|
@ -388,7 +424,11 @@ change the port number by setting the `port` class parameter.
|
||||||
|
|
||||||
Example usage:
|
Example usage:
|
||||||
|
|
||||||
class { 'apt::proxy_client': proxy => 'http://proxy.domain', port => '666' }
|
class {
|
||||||
|
'apt::proxy_client':
|
||||||
|
proxy => 'http://proxy.domain',
|
||||||
|
port => '666';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
## apt::reboot_required_notify<a name="apt-reboot_required_notify"></a>
|
## apt::reboot_required_notify<a name="apt-reboot_required_notify"></a>
|
||||||
|
@ -417,12 +457,11 @@ contents and thus makes the other parameters useless.
|
||||||
|
|
||||||
Example usage:
|
Example usage:
|
||||||
|
|
||||||
class { 'apt::unattended_upgrades':
|
class {
|
||||||
config_template => 'site_apt/50unattended-upgrades.jessie',
|
'apt::unattended_upgrades':
|
||||||
blacklisted_packages => [
|
config_template => 'site_apt/50unattended-upgrades.jessie',
|
||||||
'libc6', 'libc6-dev', 'libc6-i686', 'mysql-server', 'redmine', 'nodejs',
|
blacklisted_packages => [ 'libc6', 'libc6-dev', 'libc6-i686',
|
||||||
'bird'
|
'mysql-server', 'redmine', 'nodejs', 'bird' ];
|
||||||
],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -437,8 +476,9 @@ meta-parameter to define content inline or with the help of a template.
|
||||||
|
|
||||||
Example usage:
|
Example usage:
|
||||||
|
|
||||||
apt::apt_conf { '80download-only':
|
apt::apt_conf {
|
||||||
source => 'puppet:///modules/site_apt/80download-only',
|
'80download-only':
|
||||||
|
source => 'puppet:///modules/site_apt/80download-only';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -450,20 +490,20 @@ Example:
|
||||||
|
|
||||||
apt::preferences_snippet {
|
apt::preferences_snippet {
|
||||||
'irssi-plugin-otr':
|
'irssi-plugin-otr':
|
||||||
release => 'squeeze-backports',
|
release => 'squeeze-backports',
|
||||||
priority => 999;
|
priority => 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
apt::preferences_snippet {
|
apt::preferences_snippet {
|
||||||
'unstable_fallback':
|
'unstable_fallback':
|
||||||
package => '*',
|
package => '*',
|
||||||
release => 'unstable',
|
release => 'unstable',
|
||||||
priority => 1;
|
priority => 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
apt::preferences_snippet {
|
apt::preferences_snippet {
|
||||||
'ttdnsd':
|
'ttdnsd':
|
||||||
pin => 'origin deb.torproject.org',
|
pin => 'origin deb.torproject.org',
|
||||||
priority => 999;
|
priority => 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -492,8 +532,9 @@ following in your manifest:
|
||||||
You can also specify the content of the seed via the content parameter,
|
You can also specify the content of the seed via the content parameter,
|
||||||
for example:
|
for example:
|
||||||
|
|
||||||
apt::preseeded_package { 'apticron':
|
apt::preseeded_package {
|
||||||
content => 'apticron apticron/notification string root@example.com',
|
'apticron':
|
||||||
|
content => 'apticron apticron/notification string root@example.com';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -508,9 +549,10 @@ file name if not present in the resource name.
|
||||||
|
|
||||||
Example usage:
|
Example usage:
|
||||||
|
|
||||||
apt::sources_list { 'company_internals':
|
apt::sources_list {
|
||||||
source => [ "puppet:///modules/site_apt/${::fqdn}/company_internals.list",
|
'company_internals':
|
||||||
'puppet:///modules/site_apt/company_internals.list' ],
|
source => [ "puppet:///modules/site_apt/${::fqdn}/company_internals.list",
|
||||||
|
'puppet:///modules/site_apt/company_internals.list' ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -520,9 +562,10 @@ Deploys a secure apt OpenPGP key. This usually accompanies the
|
||||||
sources.list snippets above for third party repositories. For example,
|
sources.list snippets above for third party repositories. For example,
|
||||||
you would do:
|
you would do:
|
||||||
|
|
||||||
apt::key { 'neurodebian.gpg':
|
apt::key {
|
||||||
ensure => present,
|
'neurodebian.gpg':
|
||||||
source => 'puppet:///modules/site_apt/neurodebian.gpg',
|
ensure => present,
|
||||||
|
source => 'puppet:///modules/site_apt/neurodebian.gpg';
|
||||||
}
|
}
|
||||||
|
|
||||||
This deploys the key in the `/etc/apt/trusted.gpg.d` directory, which
|
This deploys the key in the `/etc/apt/trusted.gpg.d` directory, which
|
||||||
|
@ -539,8 +582,9 @@ Deploys a secure apt OpenPGP key. This usually accompanies the
|
||||||
sources.list snippets above for third party repositories. For example,
|
sources.list snippets above for third party repositories. For example,
|
||||||
you would do:
|
you would do:
|
||||||
|
|
||||||
apt::key::plain { 'neurodebian.asc':
|
apt::key::plain {
|
||||||
source => 'puppet:///modules/site_apt/neurodebian.asc',
|
'neurodebian.asc':
|
||||||
|
source => 'puppet:///modules/site_apt/neurodebian.asc';
|
||||||
}
|
}
|
||||||
|
|
||||||
This deploys the key in the `${apt_base_dir}/keys` directory (as
|
This deploys the key in the `${apt_base_dir}/keys` directory (as
|
||||||
|
@ -566,11 +610,14 @@ For example, the following upgrades the perl package to version 5.8.8-7etch1
|
||||||
(if it is installed), it also upgrades the syslog-ng and perl-modules packages
|
(if it is installed), it also upgrades the syslog-ng and perl-modules packages
|
||||||
to their latest (also, only if they are installed):
|
to their latest (also, only if they are installed):
|
||||||
|
|
||||||
upgrade_package { 'perl':
|
upgrade_package {
|
||||||
version => '5.8.8-7etch1';
|
'perl':
|
||||||
'syslog-ng':
|
version => '5.8.8-7etch1';
|
||||||
version => latest;
|
|
||||||
'perl-modules':
|
'syslog-ng':
|
||||||
|
version => latest;
|
||||||
|
|
||||||
|
'perl-modules':
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -591,7 +638,9 @@ This resource is usually used like this to ensure current packages are
|
||||||
installed by Package resources:
|
installed by Package resources:
|
||||||
|
|
||||||
include apt::update
|
include apt::update
|
||||||
Package { require => Exec['apt_updated'] }
|
Package {
|
||||||
|
require => Exec['apt_updated']
|
||||||
|
}
|
||||||
|
|
||||||
Note that nodes can be updated once a day by using
|
Note that nodes can be updated once a day by using
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue