diff options
author | nadir <nadir-technik@nadir.org> | 2010-02-17 13:54:05 +0100 |
---|---|---|
committer | nadir <nadir-technik@nadir.org> | 2010-02-17 13:54:05 +0100 |
commit | e95ac6b120f9d43e4b8c1dccd0badd1ced3b1fee (patch) | |
tree | 1f691f377ba13de800b5409e95b231365b233312 /manifests | |
parent | 5972a3556617b4a9acfb0046ee44164bf9b2f517 (diff) | |
download | puppet-apt-e95ac6b120f9d43e4b8c1dccd0badd1ced3b1fee.tar.gz puppet-apt-e95ac6b120f9d43e4b8c1dccd0badd1ced3b1fee.tar.bz2 |
added apt::custom_sources_template to deploy custom sources.list.d/xyz.list from templates
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index e459bd8..9a59e0c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -53,8 +53,19 @@ class apt { require => Exec[assert_lsbdistcodename]; } } - - case $custom_preferences { + + define custom_sources_template ($sources_file = "") { + file { "/etc/apt/sources.list.d/$sources_file": + content => template($name), + require => Exec[assert_lsbdistcodename]; + } + exec { "/usr/bin/apt-get update": + subscribe => File["/etc/apt/sources.list.d/$sources_file"], + refreshonly => true, + } + } + + case $custom_preferences { '': { include default_preferences } |