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 19, 2022
1 parent ee98a5a commit e6263c7
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions manifests/update.pp
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,21 @@
} 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 => "echo ${apt::provider} update FAILED",
loglevel => $apt::_update['loglevel'],
logoutput => 'on_failure',
path => '/bin:/usr/bin',
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 e6263c7

Please sign in to comment.