diff --git a/manifests/repo.pp b/manifests/repo.pp index 3f60778..d3bd1ea 100644 --- a/manifests/repo.pp +++ b/manifests/repo.pp @@ -71,15 +71,19 @@ } exec { "apt_key_add_${normalized_name}": - command => "wget --auth-no-challenge -qO - ${base_url}/${repo_name}/gpgkey | apt-key add -", - path => '/usr/bin/:/bin/', - require => File[$normalized_name], + command => "wget --auth-no-challenge -qO - ${base_url}/${repo_name}/gpgkey | apt-key add -", + path => '/usr/bin/:/bin/', + require => File[$normalized_name], + subscribe => File[$normalized_name], + refreshonly => true } exec { "apt_get_update_${normalized_name}": - command => "apt-get update -o Dir::Etc::sourcelist=\"sources.list.d/${normalized_name}.list\" -o Dir::Etc::sourceparts=\"-\" -o APT::Get::List-Cleanup=\"0\"", - path => '/usr/bin/:/bin/', - require => Exec["apt_key_add_${normalized_name}"], + command => "apt-get update -o Dir::Etc::sourcelist=\"sources.list.d/${normalized_name}.list\" -o Dir::Etc::sourceparts=\"-\" -o APT::Get::List-Cleanup=\"0\"", + path => '/usr/bin/:/bin/', + require => Exec["apt_key_add_${normalized_name}"], + subscribe => Exec["apt_key_add_${normalized_name}"], + refreshonly => true } } default: { @@ -139,9 +143,11 @@ } exec { "yum_make_cache_${repo_name}": - command => "yum -q makecache -y --disablerepo='*' --enablerepo='${normalized_name}'", - path => '/usr/bin', - require => File[$normalized_name], + command => "yum -q makecache -y --disablerepo='*' --enablerepo='${normalized_name}'", + path => '/usr/bin', + require => File[$normalized_name], + subscribe => File[$normalized_name], + refreshonly => true } }