aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2010-12-07 12:20:14 -0500
committerMicah Anderson <micah@riseup.net>2010-12-07 12:20:14 -0500
commit2ee70ab5e08eadfe750b5b7131b258270cbca402 (patch)
tree967b72f7ff9d94386c7861d7a50993f88d86baac /manifests
parent6596641bb12e3d94dbf707759b042bc7b3b476ae (diff)
downloadpuppet-apt-2ee70ab5e08eadfe750b5b7131b258270cbca402.tar.gz
puppet-apt-2ee70ab5e08eadfe750b5b7131b258270cbca402.tar.bz2
Set dselect DSelect::Clean to 'pre-auto' by default for hosts that are vservers.
Before you only had the choice of setting a 03clean apt configuration for either all hosts, or every single host. Setting it to have the recommended settings for vservers for all hosts meant that you were setting it for non-vservers as well as vservers. The other option you had was to set it per host. This was a bit annoying if you have any more than one vserver because you would need to create a 03clean for every single vserver guest. This change auto-detects if the node is a vserver, and if it is it automatically installs the 03clean_vserver file, with the recommended DSelect::Clean settings, and allows you to override this for all of your vservers, or for specific hosts.
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp19
1 files changed, 14 insertions, 5 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 3f2a523..179b4d8 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -93,12 +93,21 @@ class apt {
"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