From 3c0499b78d1f671fcce13127ef14b1b662a48c5a Mon Sep 17 00:00:00 2001 From: nadir Date: Sun, 9 Jan 2011 22:57:18 +0100 Subject: apt::custom_sources_template to deploy custom sources.list.d/xyz.list --- manifests/custom_sources.pp | 10 ++++++++++ manifests/init.pp | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 manifests/custom_sources.pp (limited to 'manifests') 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, -- cgit v1.2.3