From 4204847fdd423dfaff0dafb5130080a30003921f Mon Sep 17 00:00:00 2001 From: nadir Date: Thu, 8 Nov 2012 10:07:38 +0100 Subject: added $apt_disable_update to disable "apt-get update" during puppetruns --- manifests/dist_upgrade.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/dist_upgrade.pp') diff --git a/manifests/dist_upgrade.pp b/manifests/dist_upgrade.pp index 9e26769..347ccc7 100644 --- a/manifests/dist_upgrade.pp +++ b/manifests/dist_upgrade.pp @@ -1,6 +1,6 @@ class apt::dist_upgrade { - include apt::update + if $apt::disable_update = false { include apt::update } exec { 'apt_dist-upgrade': command => "/usr/bin/apt-get -q -y -o 'DPkg::Options::=--force-confold' dist-upgrade", -- cgit v1.2.3 From 3a473dafd5887cb77b0b764dd951d9581b69f160 Mon Sep 17 00:00:00 2001 From: nadir Date: Tue, 18 Dec 2012 22:31:00 +0100 Subject: comparing variabled should use double quotes (interestingly, it does work with only one too) --- manifests/dist_upgrade.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'manifests/dist_upgrade.pp') diff --git a/manifests/dist_upgrade.pp b/manifests/dist_upgrade.pp index 347ccc7..47b1cff 100644 --- a/manifests/dist_upgrade.pp +++ b/manifests/dist_upgrade.pp @@ -1,6 +1,8 @@ class apt::dist_upgrade { - if $apt::disable_update = false { include apt::update } + if $apt::disable_update == false { + include apt::update + } exec { 'apt_dist-upgrade': command => "/usr/bin/apt-get -q -y -o 'DPkg::Options::=--force-confold' dist-upgrade", -- cgit v1.2.3 From 37e40416d2aa7614cfbcd4330d4cd543f9874093 Mon Sep 17 00:00:00 2001 From: nadir Date: Wed, 19 Dec 2012 18:30:29 +0100 Subject: exec{'apt_dist-upgrade'} just requires Exec['apt_updated'] if apt::disable_update if false --- manifests/dist_upgrade.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'manifests/dist_upgrade.pp') diff --git a/manifests/dist_upgrade.pp b/manifests/dist_upgrade.pp index 47b1cff..ed25b0b 100644 --- a/manifests/dist_upgrade.pp +++ b/manifests/dist_upgrade.pp @@ -7,7 +7,10 @@ class apt::dist_upgrade { exec { 'apt_dist-upgrade': command => "/usr/bin/apt-get -q -y -o 'DPkg::Options::=--force-confold' dist-upgrade", refreshonly => true, - require => Exec['apt_updated'], + require => $apt::disable_update ? { + true => undef, + default => Exec['apt_updated'], + } } } -- cgit v1.2.3