File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 56
56
} else {
57
57
$_refresh = true
58
58
}
59
+ $apt_update_successful = @(" ASH" /$)
60
+ for try in \$(seq ${apt::_update[' tries' ]} -1 1); do
61
+ timeout ${apt::_update[' timeout' ]} ${apt::provider} update && exit 0
62
+ [ \$try -eq 1 ] && exit \$?
63
+ sleep 1
64
+ done
65
+ - ASH
59
66
exec { 'apt_update' :
60
- command => " ${apt::provider} update" ,
67
+ command => " echo ${apt::provider} update FAILED " ,
61
68
loglevel => $apt::_update [' loglevel' ],
62
69
logoutput => ' on_failure' ,
70
+ path => ' /bin:/usr/bin' ,
63
71
refreshonly => $_refresh,
72
+ returns => [-1], # This ensures a run-time failure.
64
73
timeout => $apt::_update [' timeout' ],
65
- tries => $apt::_update [' tries' ],
66
- try_sleep => 1,
74
+ unless => $apt_update_successful ,
67
75
}
68
76
}
You can’t perform that action at this time.
0 commit comments