README: make examples more compact

also, use commas instead of semi-colon at the end of resources to use a
coding style that makes things more extensible.
This commit is contained in:
Gabriel Filion 2016-06-27 23:47:43 +02:00
parent bb823a23f8
commit 5d95c3f5e7

View file

@ -194,10 +194,9 @@ that is not enabled by default, you must set one of the following parameters.
Example usage: Example usage:
class { class { 'apt':
'apt':
use_next_release => true, use_next_release => true,
debian_url => 'http://localhost:9999/debian/'; debian_url => 'http://localhost:9999/debian/',
} }
**Class parameters:** **Class parameters:**
@ -268,9 +267,8 @@ Example usage:
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 { class { 'apt':
'apt': custom_preferences => false,
custom_preferences => false;
} }
### custom_sources_list ### custom_sources_list
@ -283,9 +281,8 @@ Example usage:
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 { class { 'apt':
'apt': custom_sources_list => template('site_apt/sources.list'),
custom_sources_list => template('site_apt/sources.list');
} }
### custom_key_dir ### custom_key_dir
@ -318,10 +315,9 @@ defaults, which you are free to change:
Example usage: Example usage:
class { class { 'apt::apticron':
'apt::apticron':
email => 'foo@example.com', email => 'foo@example.com',
notifynew => '1'; notifynew => '1',
} }
@ -407,9 +403,8 @@ the following parameterized variables, which can be changed:
Example usage: Example usage:
class { class { 'apt::listchanges':
'apt::listchanges': email => 'foo@example.com',
email => 'foo@example.com';
} }
@ -424,10 +419,9 @@ change the port number by setting the `port` class parameter.
Example usage: Example usage:
class { class { 'apt::proxy_client':
'apt::proxy_client':
proxy => 'http://proxy.domain', proxy => 'http://proxy.domain',
port => '666'; port => '666',
} }
@ -457,11 +451,10 @@ contents and thus makes the other parameters useless.
Example usage: Example usage:
class { class { 'apt::unattended_upgrades':
'apt::unattended_upgrades':
config_template => 'site_apt/50unattended-upgrades.jessie', config_template => 'site_apt/50unattended-upgrades.jessie',
blacklisted_packages => [ 'libc6', 'libc6-dev', 'libc6-i686', blacklisted_packages => [ 'libc6', 'libc6-dev', 'libc6-i686',
'mysql-server', 'redmine', 'nodejs', 'bird' ]; 'mysql-server', 'redmine', 'nodejs', 'bird' ],
} }
@ -476,9 +469,8 @@ meta-parameter to define content inline or with the help of a template.
Example usage: Example usage:
apt::apt_conf { apt::apt_conf { '80download-only':
'80download-only': source => 'puppet:///modules/site_apt/80download-only',
source => 'puppet:///modules/site_apt/80download-only';
} }
@ -486,25 +478,22 @@ Example usage:
A way to add pinning information to files in `/etc/apt/preferences.d/` A way to add pinning information to files in `/etc/apt/preferences.d/`
Example: Examples:
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,
} }
The names of the resources will be used as the names of the files in the The names of the resources will be used as the names of the files in the
@ -532,9 +521,8 @@ 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 { apt::preseeded_package { 'apticron':
'apticron': content => 'apticron apticron/notification string root@example.com',
content => 'apticron apticron/notification string root@example.com';
} }
@ -549,8 +537,7 @@ file name if not present in the resource name.
Example usage: Example usage:
apt::sources_list { apt::sources_list { 'company_internals':
'company_internals':
source => [ "puppet:///modules/site_apt/${::fqdn}/company_internals.list", source => [ "puppet:///modules/site_apt/${::fqdn}/company_internals.list",
'puppet:///modules/site_apt/company_internals.list' ]; 'puppet:///modules/site_apt/company_internals.list' ];
} }
@ -582,8 +569,7 @@ 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 { apt::key::plain { 'neurodebian.asc':
'neurodebian.asc':
source => 'puppet:///modules/site_apt/neurodebian.asc'; source => 'puppet:///modules/site_apt/neurodebian.asc';
} }
@ -613,10 +599,8 @@ to their latest (also, only if they are installed):
upgrade_package { upgrade_package {
'perl': 'perl':
version => '5.8.8-7etch1'; version => '5.8.8-7etch1';
'syslog-ng': 'syslog-ng':
version => latest; version => latest;
'perl-modules': 'perl-modules':
} }