Force an apt-get update when changing an apt::sources_list
sources_list doesn't currently force puppet to run 'apt-get update' after creating/modifying/removing files in sources.list.d. Signed-off-by: Gabriel Filion <lelutin@gmail.com>
This commit is contained in:
parent
4d0ddd0057
commit
a835369958
3 changed files with 11 additions and 3 deletions
|
@ -14,10 +14,13 @@ define apt::apt_conf(
|
|||
|
||||
include apt::dot_d_directories
|
||||
|
||||
# One would expect the 'file' resource on sources.list.d to trigger an
|
||||
# apt-get update when files are added or modified in the directory, but it
|
||||
# apparently doesn't.
|
||||
file { "/etc/apt/apt.conf.d/${name}":
|
||||
ensure => $ensure,
|
||||
owner => root, group => 0, mode => 0644,
|
||||
notify => Exec["refresh_apt"],
|
||||
owner => root, group => 0, mode => 0644;
|
||||
}
|
||||
|
||||
if $source {
|
||||
|
|
|
@ -85,7 +85,8 @@ class apt {
|
|||
'' => template( "apt/$operatingsystem/sources.list.erb"),
|
||||
default => $custom_sources_list
|
||||
},
|
||||
require => Package['lsb'];
|
||||
require => Package['lsb'],
|
||||
notify => Exec['refresh_apt'],
|
||||
}
|
||||
|
||||
apt_conf { "02show_upgraded":
|
||||
|
|
|
@ -13,9 +13,13 @@ define apt::sources_list (
|
|||
|
||||
include apt::dot_d_directories
|
||||
|
||||
# One would expect the 'file' resource on sources.list.d to trigger an
|
||||
# apt-get update when files are added or modified in the directory, but it
|
||||
# apparently doesn't.
|
||||
file { "/etc/apt/sources.list.d/${name}":
|
||||
ensure => $ensure,
|
||||
owner => root, group => 0, mode => 0644;
|
||||
owner => root, group => 0, mode => 0644,
|
||||
notify => Exec['refresh_apt'],
|
||||
}
|
||||
|
||||
if $source {
|
||||
|
|
Loading…
Reference in a new issue