summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp15
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
}