]> gitweb.fluxo.info Git - puppet-apt.git/commitdiff
apt::custom_sources_template to deploy custom sources.list.d/xyz.list
authornadir <nadir-technik@nadir.org>
Sun, 9 Jan 2011 21:57:18 +0000 (22:57 +0100)
committernadir <nadir-technik@nadir.org>
Sun, 9 Jan 2011 21:57:18 +0000 (22:57 +0100)
manifests/custom_sources.pp [new file with mode: 0644]
manifests/init.pp

diff --git a/manifests/custom_sources.pp b/manifests/custom_sources.pp
new file mode 100644 (file)
index 0000000..d0c020a
--- /dev/null
@@ -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'] 
+  }
+}
+
index b5be91fc6ed5989fcfdc896aaa7d127f461ceb1f..57f02e908acb5f10d0e29a45620a76649df00f93 100644 (file)
@@ -5,6 +5,8 @@
 
 class apt {
 
+  import "custom_sources.pp"
+
   $use_volatile = $apt_volatile_enabled ? {
     ''      => false,
     default => $apt_volatile_enabled,