X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fsetting.pp;h=b0fb62b1debd8fb5d90c1f86cb0f0bdc5e778a7f;hb=89c747ab3b2caad9b36b8ce53a693537f4db6f36;hp=c288b35d7ec00ce545af777de09bfe977026738c;hpb=0475e50be8e4994e4c1c22ce103e903f52c2c599;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/setting.pp b/manifests/setting.pp index c288b35..b0fb62b 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') } @@ -39,34 +37,28 @@ define apt::setting ( validate_string($content) } - if $setting_type == 'list' { + if ($setting_type == 'list') or ($setting_type == 'pref') { $_priority = '' } else { $_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'] - } - } }