X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fsetting.pp;h=d723eb2c53103b0db61f7a3bf3155620d90ace90;hb=9f43b2db2655e216035c129b1031b225c83a6030;hp=c288b35d7ec00ce545af777de09bfe977026738c;hpb=0475e50be8e4994e4c1c22ce103e903f52c2c599;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/setting.pp b/manifests/setting.pp index c288b35..d723eb2 100644 --- a/manifests/setting.pp +++ b/manifests/setting.pp @@ -3,12 +3,10 @@ define apt::setting ( $ensure = file, $source = undef, $content = undef, - $file_perms = {}, $notify_update = true, ) { - $_file = merge($::apt::file_defaults, $file_perms) - + include 'apt::params' if $content and $source { fail('apt::setting cannot have both content and source') } @@ -45,28 +43,22 @@ define apt::setting ( $_priority = $priority } - $_path = $::apt::config_files[$setting_type]['path'] - $_ext = $::apt::config_files[$setting_type]['ext'] + $_path = $::apt::params::config_files[$setting_type]['path'] + $_ext = $::apt::params::config_files[$setting_type]['ext'] if $notify_update { - $_notify = Exec['apt_update'] + $_notify = Class['apt::update'] } else { $_notify = undef } file { "${_path}/${_priority}${base_name}${_ext}": ensure => $ensure, - owner => $_file['owner'], - group => $_file['group'], - mode => $_file['mode'], + owner => 'root', + group => 'root', + mode => '0644', content => $content, source => $source, notify => $_notify, } - - if $notify_update { - anchor { "apt::setting::${name}": - require => Class['apt::update'] - } - } }