aboutsummaryrefslogtreecommitdiff
path: root/manifests/nodo.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-05-21 17:46:51 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-05-21 17:46:51 -0300
commit1b94681daf1980cb79c17a2efa18a24d0de182c9 (patch)
treeb443190535367de02d04bc5ea939883a8396891e /manifests/nodo.pp
parenta703d0f229c889d837c222cf3ce8ab65fd82b7f0 (diff)
downloadpuppet-nodo-1b94681daf1980cb79c17a2efa18a24d0de182c9.tar.gz
puppet-nodo-1b94681daf1980cb79c17a2efa18a24d0de182c9.tar.bz2
Adding support for a custom apt preferences
Diffstat (limited to 'manifests/nodo.pp')
-rw-r--r--manifests/nodo.pp12
1 files changed, 12 insertions, 0 deletions
diff --git a/manifests/nodo.pp b/manifests/nodo.pp
index b5ac46a..b4b7e22 100644
--- a/manifests/nodo.pp
+++ b/manifests/nodo.pp
@@ -52,6 +52,18 @@ class nodo {
}
}
+ # Preferences file can't have dots in the filename
+ $apt_domain_preferences = regsubst($domain, '\.', '-', 'G')
+
+ file { "/etc/apt/preferences.d/$apt_domain_preferences":
+ source => [ "puppet:///modules/site-apt/preferences.d/$operatingsystem/$domain",
+ "puppet:///modules/nodo/preferences.d/custom" ],
+ ensure => $apt_domain_source ? {
+ true => present,
+ default => absent,
+ }
+ }
+
package { 'apt-transport-https':
ensure => present,
}