summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis-Philippe VĂ©ronneau <pollito@riseup.net>2016-12-22 22:17:35 -0500
committerLouis-Philippe VĂ©ronneau <pollito@riseup.net>2016-12-22 22:17:35 -0500
commitbdd6cf421143914cc2c0c63fa543013892fd3bed (patch)
treec31548c83a18fc984765157d63421abb4d1df936
parent2c56e06458d0308faf3746aff536558362d1082b (diff)
use the same name for the update_apt exec everywhere
-rw-r--r--manifests/apt_conf.pp2
-rw-r--r--manifests/config.pp22
-rw-r--r--manifests/dist_upgrade.pp2
-rw-r--r--manifests/dot_d_directories.pp5
-rw-r--r--manifests/key.pp2
-rw-r--r--manifests/key/plain.pp2
-rw-r--r--manifests/preferences_snippet.pp2
-rw-r--r--manifests/sources_list.pp2
-rw-r--r--manifests/upgrade_package.pp2
9 files changed, 20 insertions, 21 deletions
diff --git a/manifests/apt_conf.pp b/manifests/apt_conf.pp
index 709fd23..8225915 100644
--- a/manifests/apt_conf.pp
+++ b/manifests/apt_conf.pp
@@ -38,7 +38,7 @@ define apt::apt_conf (
if $refresh_apt {
File["/etc/apt/apt.conf.d/${name}"] {
- notify => Exec['apt_updated'],
+ notify => Exec['update_apt'],
}
}
}
diff --git a/manifests/config.pp b/manifests/config.pp
index 3db84d7..416aabc 100644
--- a/manifests/config.pp
+++ b/manifests/config.pp
@@ -1,5 +1,13 @@
class apt::config inherits apt {
+ exec { 'update_apt':
+ command => '/usr/bin/apt-get update',
+ require => [ File['/etc/apt/apt.conf.d',
+ '/etc/apt/preferences',
+ '/etc/apt/sources.list'] ],
+ refreshonly => true;
+ }
+
$sources_content = $custom_sources_list ? {
'' => template( "apt/${::operatingsystem}/sources.list.erb"),
default => $custom_sources_list
@@ -9,7 +17,7 @@ class apt::config inherits apt {
# additional sources should be included via the apt::sources_list define
'/etc/apt/sources.list':
content => $sources_content,
- notify => Exec['apt_updated'],
+ notify => Exec['update_apt'],
owner => root,
group => 0,
mode => '0644';
@@ -70,7 +78,7 @@ class apt::config inherits apt {
command => "find ${apt_base_dir}/keys.d -type f -exec apt-key add '{}' \\;",
subscribe => File["${apt_base_dir}/keys.d"],
refreshonly => true,
- notify => Exec[refresh_apt]
+ notify => Exec['update_apt'];
}
if $custom_preferences != false {
Exec['custom_keys'] {
@@ -78,14 +86,4 @@ class apt::config inherits apt {
}
}
}
-
- exec { 'update_apt':
- command => '/usr/bin/apt-get update',
- require => [ File['/etc/apt/apt.conf.d',
- '/etc/apt/preferences',
- '/etc/apt/sources.list'] ],
- refreshonly => true,
- # Another Semaphor for all packages to reference
- alias => [ 'apt_updated', 'refresh_apt']
- }
}
diff --git a/manifests/dist_upgrade.pp b/manifests/dist_upgrade.pp
index 3d9b29b..38ae417 100644
--- a/manifests/dist_upgrade.pp
+++ b/manifests/dist_upgrade.pp
@@ -6,6 +6,6 @@ class apt::dist_upgrade (
command => '/usr/bin/apt-get -q -y -o \'DPkg::Options::=--force-confold\' dist-upgrade',
refreshonly => true,
timeout => $timeout,
- before => Exec['apt_updated']
+ before => Exec['update_apt']
}
}
diff --git a/manifests/dot_d_directories.pp b/manifests/dot_d_directories.pp
index 970cea0..6d9f790 100644
--- a/manifests/dot_d_directories.pp
+++ b/manifests/dot_d_directories.pp
@@ -6,10 +6,11 @@ class apt::dot_d_directories {
'/etc/apt/apt.conf.d':
ensure => directory,
checksum => mtime,
- notify => Exec['apt_updated'];
+ notify => Exec['update_apt'];
+
'/etc/apt/sources.list.d':
ensure => directory,
checksum => mtime,
- notify => Exec['apt_updated'];
+ notify => Exec['update_apt'];
}
}
diff --git a/manifests/key.pp b/manifests/key.pp
index cb70ec6..6ec6523 100644
--- a/manifests/key.pp
+++ b/manifests/key.pp
@@ -8,6 +8,6 @@ define apt::key ($source, $ensure = 'present') {
"/etc/apt/trusted.gpg.d/${name}":
ensure => $ensure,
source => $source,
- notify => Exec['apt_updated'],
+ notify => Exec['update_apt'],
}
}
diff --git a/manifests/key/plain.pp b/manifests/key/plain.pp
index dff8b51..e845b88 100644
--- a/manifests/key/plain.pp
+++ b/manifests/key/plain.pp
@@ -8,6 +8,6 @@ define apt::key::plain ($source) {
exec { "apt-key add '${apt::apt_base_dir}/keys/${name}'":
subscribe => File["${apt::apt_base_dir}/keys/${name}"],
refreshonly => true,
- notify => Exec['apt_updated'],
+ notify => Exec['update_apt'],
}
}
diff --git a/manifests/preferences_snippet.pp b/manifests/preferences_snippet.pp
index e142ea0..eee1511 100644
--- a/manifests/preferences_snippet.pp
+++ b/manifests/preferences_snippet.pp
@@ -32,7 +32,7 @@ define apt::preferences_snippet (
file { "/etc/apt/preferences.d/${name}":
ensure => $ensure,
owner => root, group => 0, mode => '0644',
- before => Exec['apt_updated'];
+ before => Exec['update_apt'];
}
case $source {
diff --git a/manifests/sources_list.pp b/manifests/sources_list.pp
index 2fc7111..35a7643 100644
--- a/manifests/sources_list.pp
+++ b/manifests/sources_list.pp
@@ -27,7 +27,7 @@ define apt::sources_list (
mode => '0644',
owner => 'root',
group => 0,
- notify => Exec['apt_updated'],
+ notify => Exec['update_apt'],
}
if $source {
diff --git a/manifests/upgrade_package.pp b/manifests/upgrade_package.pp
index f739f07..a96db7c 100644
--- a/manifests/upgrade_package.pp
+++ b/manifests/upgrade_package.pp
@@ -26,6 +26,6 @@ define apt::upgrade_package (
exec { "apt-get -q -y -o 'DPkg::Options::=--force-confold' install ${name}${version_suffix}":
onlyif => [ "grep-status -F Status installed -a -P ${name} -q", "apt-show-versions -u ${name} | grep -q upgradeable" ],
require => Package['apt-show-versions', 'dctrl-tools'],
- before => Exec['apt_updated']
+ before => Exec['update_apt']
}
}