aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-05-26 14:29:46 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-05-26 14:29:46 -0300
commit869db00cde98be60850f1c61297756635b90fee1 (patch)
tree77b5eb78813dbf5f66c42fb114e2b513e7b9e950 /manifests
parent61fac2f15df901b5a213352024dd63e67f18ab18 (diff)
parent358d963f259d3f409bd0dd6433718a673083533c (diff)
downloadpuppet-apt-869db00cde98be60850f1c61297756635b90fee1.tar.gz
puppet-apt-869db00cde98be60850f1c61297756635b90fee1.tar.bz2
Merge branch 'nadir'
Diffstat (limited to 'manifests')
-rw-r--r--manifests/apt_conf.pp11
-rw-r--r--manifests/init.pp6
-rw-r--r--manifests/unattended_upgrades.pp10
3 files changed, 19 insertions, 8 deletions
diff --git a/manifests/apt_conf.pp b/manifests/apt_conf.pp
index d78fb9b..f446c69 100644
--- a/manifests/apt_conf.pp
+++ b/manifests/apt_conf.pp
@@ -1,7 +1,8 @@
define apt::apt_conf(
$ensure = 'present',
$source = '',
- $content = undef )
+ $content = undef,
+ $refresh_apt = true )
{
if $source == '' and $content == undef {
@@ -22,7 +23,6 @@ define apt::apt_conf(
owner => root,
group => 0,
mode => '0644',
- notify => Exec['refresh_apt'],
}
if $source {
@@ -35,4 +35,11 @@ define apt::apt_conf(
content => $content,
}
}
+
+ if $refresh_apt {
+ File["/etc/apt/apt.conf.d/${name}"] {
+ notify => Exec['refresh_apt'],
+ }
+ }
+
}
diff --git a/manifests/init.pp b/manifests/init.pp
index de28c23..33eac37 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -129,7 +129,11 @@ class apt(
}
if $custom_preferences != false {
Exec['custom_keys'] {
- before => File['apt_config'],
+ before => [ Exec[refresh_apt], File['apt_config'] ]
+ }
+ } else {
+ Exec['custom_keys'] {
+ before => Exec[refresh_apt]
}
}
}
diff --git a/manifests/unattended_upgrades.pp b/manifests/unattended_upgrades.pp
index 2a6fe9e..398a1a7 100644
--- a/manifests/unattended_upgrades.pp
+++ b/manifests/unattended_upgrades.pp
@@ -2,15 +2,15 @@ class apt::unattended_upgrades {
package { 'unattended-upgrades':
ensure => present,
- require => undef,
+ require => undef
}
apt_conf { '50unattended-upgrades':
source => [
- "puppet:///modules/site_apt/${::lsbdistcodename}/50unattended-upgrades",
- 'puppet:///modules/site_apt/50unattended-upgrades',
- "puppet:///modules/apt/${::lsbdistcodename}/50unattended-upgrades",
- 'puppet:///modules/apt/50unattended-upgrades' ],
+ "puppet:///modules/site_apt/${::lsbdistid}/50unattended-upgrades.${::lsbdistcodename}",
+ "puppet:///modules/site_apt/${::lsbdistid}/50unattended-upgrades",
+ "puppet:///modules/apt/${::lsbdistid}/50unattended-upgrades.${::lsbdistcodename}",
+ "puppet:///modules/apt/${::lsbdistid}/50unattended-upgrades" ],
require => Package['unattended-upgrades'],
}