diff options
author | Louis-Philippe VĂ©ronneau <pollito@riseup.net> | 2016-12-22 22:17:35 -0500 |
---|---|---|
committer | Louis-Philippe VĂ©ronneau <pollito@riseup.net> | 2016-12-22 22:17:35 -0500 |
commit | bdd6cf421143914cc2c0c63fa543013892fd3bed (patch) | |
tree | c31548c83a18fc984765157d63421abb4d1df936 /manifests/config.pp | |
parent | 2c56e06458d0308faf3746aff536558362d1082b (diff) |
use the same name for the update_apt exec everywhere
Diffstat (limited to 'manifests/config.pp')
-rw-r--r-- | manifests/config.pp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/manifests/config.pp b/manifests/config.pp index 3db84d7..416aabc 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,5 +1,13 @@ class apt::config inherits apt { + exec { 'update_apt': + command => '/usr/bin/apt-get update', + require => [ File['/etc/apt/apt.conf.d', + '/etc/apt/preferences', + '/etc/apt/sources.list'] ], + refreshonly => true; + } + $sources_content = $custom_sources_list ? { '' => template( "apt/${::operatingsystem}/sources.list.erb"), default => $custom_sources_list @@ -9,7 +17,7 @@ class apt::config inherits apt { # additional sources should be included via the apt::sources_list define '/etc/apt/sources.list': content => $sources_content, - notify => Exec['apt_updated'], + notify => Exec['update_apt'], owner => root, group => 0, mode => '0644'; @@ -70,7 +78,7 @@ class apt::config inherits apt { command => "find ${apt_base_dir}/keys.d -type f -exec apt-key add '{}' \\;", subscribe => File["${apt_base_dir}/keys.d"], refreshonly => true, - notify => Exec[refresh_apt] + notify => Exec['update_apt']; } if $custom_preferences != false { Exec['custom_keys'] { @@ -78,14 +86,4 @@ class apt::config inherits apt { } } } - - exec { 'update_apt': - command => '/usr/bin/apt-get update', - require => [ File['/etc/apt/apt.conf.d', - '/etc/apt/preferences', - '/etc/apt/sources.list'] ], - refreshonly => true, - # Another Semaphor for all packages to reference - alias => [ 'apt_updated', 'refresh_apt'] - } } |