validate_bool($purge_sources_list, $purge_sources_list_d)
- if ! defined(Package['python-software-properties']) {
- package { 'python-software-properties': }
- }
-
$sources_list_content = $purge_sources_list ? {
false => undef,
true => "# Repos managed by puppet.\n",
}
if $always_apt_update == true {
- Exec <| title=='apt update' |> {
+ Exec <| title=='apt_update' |> {
refreshonly => false,
}
}
group => root,
mode => '0644',
content => $sources_list_content,
- notify => Exec['apt update'],
+ notify => Exec['apt_update'],
}
file { 'sources.list.d':
group => root,
purge => $purge_sources_list_d,
recurse => $purge_sources_list_d,
- notify => Exec['apt update'],
+ notify => Exec['apt_update'],
}
case $disable_keys {
file { 'configure-apt-proxy':
path => "${apt_conf_d}/proxy",
content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";",
- notify => Exec['apt update'],
+ notify => Exec['apt_update'],
}
}
+
+ # Need anchor to provide containment for dependencies.
+ anchor { "apt::update":
+ require => Class['apt::update'],
+ }
}