From ac76a5d52df78aec919f08334ca5b140902a9298 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sun, 24 Oct 2010 09:07:34 -0400 Subject: Add apt_conf_snippet and use it where possible With the new define, it's easy to add an apt.conf snippet in apt.conf.d It accepts either 'sources' to get a static file or 'content' to define content inline or with the help of a template. Put it to use where we create files in apt.conf.d Finally, fix the dependancy to the apt_config file (however, I don't see the need for this dependancy) Signed-off-by: Gabriel Filion --- manifests/unattended_upgrades.pp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'manifests/unattended_upgrades.pp') diff --git a/manifests/unattended_upgrades.pp b/manifests/unattended_upgrades.pp index e1080a0..6a0c685 100644 --- a/manifests/unattended_upgrades.pp +++ b/manifests/unattended_upgrades.pp @@ -4,14 +4,11 @@ class apt::unattended_upgrades { require => undef, } - config_file { - "/etc/apt/apt.conf.d/50unattended-upgrades": - source => ["puppet:///modules/site-apt/50unattended-upgrades", - "puppet:///modules/apt/50unattended-upgrades" ], + apt_conf_snippet { "50unattended-upgrades": + source => ["puppet:///modules/site-apt/50unattended-upgrades", + "puppet:///modules/apt/50unattended-upgrades" ], - # err: Could not run Puppet configuration client: Could not find dependent Config_file[apt_config] for Config_file[/etc/apt/apt.conf.d/50unattended-upgrades] at /etc/puppet/modules/apt/manifests/unattended_upgrades.pp:14 - - #before => Config_file[apt_config], + before => Concatenated_file[apt_config], require => Package['unattended-upgrades'], } } -- cgit v1.2.3