Code Review
/
puppet-modules
/
puppetlabs-apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
(#11966) apt module containment for apt_update.
[puppet-modules/puppetlabs-apt.git]
/
manifests
/
source.pp
diff --git
a/manifests/source.pp
b/manifests/source.pp
index c63fc2fb2282d5bd2dc457a256442683747b6b13..e55cafdfd1f4fbb493247f88b5a497270eec743e 100644
(file)
--- a/
manifests/source.pp
+++ b/
manifests/source.pp
@@
-16,6
+16,7
@@
define apt::source(
) {
include apt::params
) {
include apt::params
+ include apt::update
$sources_list_d = $apt::params::sources_list_d
$provider = $apt::params::provider
$sources_list_d = $apt::params::sources_list_d
$provider = $apt::params::provider
@@
-31,6
+32,7
@@
define apt::source(
group => root,
mode => '0644',
content => template("${module_name}/source.list.erb"),
group => root,
mode => '0644',
content => template("${module_name}/source.list.erb"),
+ notify => Exec['apt_update'],
}
if ($pin != false) and ($ensure == 'present') {
}
if ($pin != false) and ($ensure == 'present') {
@@
-40,12
+42,6
@@
define apt::source(
}
}
}
}
- exec { "${name} apt update":
- command => "${provider} update",
- subscribe => File["${name}.list"],
- refreshonly => true,
- }
-
if ($required_packages != false) and ($ensure == 'present') {
exec { "Required packages: '${required_packages}' for ${name}":
command => "${provider} -y install ${required_packages}",
if ($required_packages != false) and ($ensure == 'present') {
exec { "Required packages: '${required_packages}' for ${name}":
command => "${provider} -y install ${required_packages}",
@@
-65,4
+61,9
@@
define apt::source(
before => File["${name}.list"],
}
}
before => File["${name}.list"],
}
}
+
+ # Need anchor to provide containment for dependencies.
+ anchor { "apt::source::${name}":
+ require => Class['apt::update'],
+ }
}
}