From e99f7c8672342c4e00522e6be851a14ae1d56d4d Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 5 Aug 2011 10:57:13 +0200 Subject: migrate concatenated_file to the concat module --- manifests/preferences_snippet.pp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'manifests/preferences_snippet.pp') diff --git a/manifests/preferences_snippet.pp b/manifests/preferences_snippet.pp index 4b8e575..bcc12de 100644 --- a/manifests/preferences_snippet.pp +++ b/manifests/preferences_snippet.pp @@ -11,11 +11,9 @@ define apt::preferences_snippet( include apt::preferences - file { "${apt::preferences::apt_preferences_dir}/${name}": + concat::fragment{"apt_preference_${name}": ensure => $ensure, - #TODO this template is somewhat limited - notify => Exec["concat_${apt::preferences::apt_preferences_dir}"], - owner => root, group => 0, mode => 0600; + target => '/etc/apt/preferences', } # This should really work in the same manner as sources_list and apt_conf @@ -23,12 +21,12 @@ define apt::preferences_snippet( # lenny, we can't generalize without going into ugly special-casing. case $source { '': { - File["${apt::preferences::apt_preferences_dir}/${name}"] { + Concat::Fragment[$name]{ content => template("apt/preferences_snippet.erb") } } default: { - File["${apt::preferences::apt_preferences_dir}/${name}"] { + Concat::Fragment[$name]{ source => $source } } -- cgit v1.2.3