diff options
author | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-02-20 16:09:44 -0500 |
---|---|---|
committer | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-02-20 16:09:44 -0500 |
commit | e3e0b46ca6039170c2d2faa8b2bebf14460679eb (patch) | |
tree | 2f255b0f4d109afeb15d870f2151ec9da0100ba0 /manifests/sources_list.pp | |
parent | c9ae59e1b72d41518160ff4c7b430573b10254a3 (diff) | |
parent | 7c55bee06ab952c914b3a367f495e36a2539807f (diff) | |
download | puppet-apt-e3e0b46ca6039170c2d2faa8b2bebf14460679eb.tar.gz puppet-apt-e3e0b46ca6039170c2d2faa8b2bebf14460679eb.tar.bz2 |
Merge branch 'master' of gitlab.com:shared-puppet-modules-group/apt
Diffstat (limited to 'manifests/sources_list.pp')
-rw-r--r-- | manifests/sources_list.pp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/manifests/sources_list.pp b/manifests/sources_list.pp index 3367f83..aefad2d 100644 --- a/manifests/sources_list.pp +++ b/manifests/sources_list.pp @@ -15,22 +15,24 @@ define apt::sources_list ( include apt::dot_d_directories + $realname = regsubst($name, '\.list$', '') + # 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}": + file { "/etc/apt/sources.list.d/${realname}.list": ensure => $ensure, owner => root, group => 0, mode => '0644', notify => Exec['refresh_apt'], } if $source { - File["/etc/apt/sources.list.d/${name}"] { + File["/etc/apt/sources.list.d/${realname}.list"] { source => $source, } } else { - File["/etc/apt/sources.list.d/${name}"] { + File["/etc/apt/sources.list.d/${realname}.list"] { content => $content, } } |