aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/custom_sources.pp10
-rw-r--r--manifests/init.pp2
-rw-r--r--manifests/preferences.pp2
3 files changed, 13 insertions, 1 deletions
diff --git a/manifests/custom_sources.pp b/manifests/custom_sources.pp
new file mode 100644
index 0000000..d0c020a
--- /dev/null
+++ b/manifests/custom_sources.pp
@@ -0,0 +1,10 @@
+define apt::custom_sources_template ($sources_file = "") {
+
+ include apt::update
+
+ file { "/etc/apt/sources.list.d/$sources_file":
+ content => template($name),
+ notify => Exec['apt_updated']
+ }
+}
+
diff --git a/manifests/init.pp b/manifests/init.pp
index b5be91f..57f02e9 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -5,6 +5,8 @@
class apt {
+ import "custom_sources.pp"
+
$use_volatile = $apt_volatile_enabled ? {
'' => false,
default => $apt_volatile_enabled,
diff --git a/manifests/preferences.pp b/manifests/preferences.pp
index 4c93542..71ef0a6 100644
--- a/manifests/preferences.pp
+++ b/manifests/preferences.pp
@@ -7,7 +7,7 @@ class apt::preferences {
content => $custom_preferences ? {
'' => $operatingsystem ? {
'debian' => template("apt/${operatingsystem}/preferences_${codename}.erb"),
- 'ubuntu' => '',
+ 'ubuntu' => template("apt/${operatingsystem}/preferences_${codename}.erb"),
},
default => $custom_preferences
},