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 committed Dec 8, 2022
1 parent e8cd1d2 commit b626e7f
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 = @("ASH"/$)
for try in $(seq ${apt::_update['tries']} -1 1); do
timeout ${apt::_update['timeout']} ${apt::provider} update && exit 0
[ \$try -eq 1 ] && exit \$?
sleep 1
done
- ASH
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 b626e7f

Please sign in to comment.