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/proxy-client.pp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'manifests/proxy-client.pp') diff --git a/manifests/proxy-client.pp b/manifests/proxy-client.pp index ea0a29c..30bda8a 100644 --- a/manifests/proxy-client.pp +++ b/manifests/proxy-client.pp @@ -10,9 +10,7 @@ class apt::proxy-client { default => $apt_proxy_port } - file { "/etc/apt/apt.conf.d/20proxy": - ensure => present, - content => "Acquire::http { Proxy \"http://$real_apt_proxy:$real_apt_proxy_port\"; };\n", - owner => root, group => 0, mode => 0644; + apt_conf_snippet { "20proxy": + content => template("apt/20proxy.erb"), } } -- cgit v1.2.3