Skip to content

Commit

Permalink
MODULES-10763 Do not report apt-get update as a change
Browse files Browse the repository at this point in the history
  • Loading branch information
pillarsdotnet authored and Robert A. Vincent II (Bob-Vee) committed Dec 7, 2022
1 parent e8cd1d2 commit 29ee062
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions manifests/update.pp
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,20 @@
} else {
$_refresh = true
}
$apt_update_successful = @("BASH")
for try in {${apt::_update['tries']}..1}; do
timeout ${apt::_update['timeout'] ${apt::provider} update && exit 0
[[ $try -eq 1 ]] && exit $?
sleep 1
done
- BASH
exec { 'apt_update':
command => "${apt::provider} update",
command => "${apt::provider} update FAILED",
loglevel => $apt::_update['loglevel'],
logoutput => 'on_failure',
refreshonly => $_refresh,
returns => [-1], # This ensures a run-time failure.
timeout => $apt::_update['timeout'],
tries => $apt::_update['tries'],
try_sleep => 1,
unless => $apt_update_successful,
}
}

0 comments on commit 29ee062

Please sign in to comment.