- lsb-release installed
- the common module: git://labs.riseup.net/shared-common
-By default, this module sets the configuration option DSelect::Clean to 'auto'.
-It is the recommended value on normal hosts. On virtual servers, the
-recommended value is 'pre-auto', since virtual servers are usually more
-space-bound and have better recovery mechanisms via the host:
+By default, on normal hosts, this module sets the configuration option
+DSelect::Clean to 'auto'. On virtual servers, the value is set by default to
+'pre-auto', because virtual servers are usually more space-bound and have better
+recovery mechanisms via the host:
From apt.conf(5), 0.7.2:
"Cache Clean mode; this value may be one of always, prompt, auto,
packages."
To change the default setting for DSelect::Clean, you can create a file named
-"03clean" in a site-apt module's files directory. You can also define this for
-a specific host by creating a file in a subdirectory of the site-apt modules'
-files directory that is named the same as the host. (example:
-site-apt/files/some.host.com/03clean)
+"03clean" or "03clean_vserver" in your site-apt module's files directory. You
+can also define this for a specific host by creating a file in a subdirectory of
+the site-apt modules' files directory that is named the same as the
+host. (example: site-apt/files/some.host.com/03clean, or
+site-apt/files/some.host.com/03clean_vserver)
Variables
=========
"puppet:///modules/apt/02show_upgraded"]
}
- apt_conf { "03clean":
- source => ["puppet:///modules/site-apt/${fqdn}/03clean",
- "puppet:///modules/site-apt/03clean",
- "puppet:///modules/apt/03clean"]
+ if ( $virtual == "vserver" ) {
+ apt_conf { "03clean_vserver":
+ source => ["puppet:///modules/site-apt/${fqdn}/03clean_vserver",
+ "puppet:///modules/site-apt/03clean_vserver",
+ "puppet:///modules/apt/03clean_vserver"]
+ }
}
-
+ else {
+ apt_conf { "03clean":
+ source => ["puppet:///modules/site-apt/${fqdn}/03clean",
+ "puppet:///modules/site-apt/03clean",
+ "puppet:///modules/apt/03clean"]
+ }
+ }
+
case $custom_preferences {
false: {
include apt::preferences::absent