aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/custom_sources.pp10
-rw-r--r--manifests/init.pp2
2 files changed, 12 insertions, 0 deletions
diff --git a/manifests/custom_sources.pp b/manifests/custom_sources.pp
new file mode 100644
index 0000000..cd7b8fc
--- /dev/null
+++ b/manifests/custom_sources.pp
@@ -0,0 +1,10 @@
+define apt::custom_sources_template ($sources_file = "") {
+ file { "/etc/apt/sources.list.d/$sources_file":
+ content => template($name),
+ }
+ exec { "/usr/bin/apt-get update":
+ subscribe => File["/etc/apt/sources.list.d/$sources_file"],
+ refreshonly => true,
+ }
+ }
+
diff --git a/manifests/init.pp b/manifests/init.pp
index 78ae6c5..9c33b4d 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -5,6 +5,8 @@
class apt {
+ import "custom_sources.pp"
+
# See README
$real_apt_clean = $apt_clean ? {
'' => 'auto',