From 1b94681daf1980cb79c17a2efa18a24d0de182c9 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 21 May 2012 17:46:51 -0300 Subject: Adding support for a custom apt preferences --- manifests/nodo.pp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'manifests/nodo.pp') 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, } -- cgit v1.2.3