We have an archive resource like this:
archive { 'oracle_patch':
ensure => present,
url => 'http://some.server/path/oracle_patch.tgz',
target => '/some/path/local',
digest_type => 'md5',
digest_string => $::oracle_patch_md5sum,
extension => 'tgz',
src_target => '/some/path/local',
checksum => true,
user => 'oracle',
timeout => 600,
}
$::oracle_patch_md5sum is defined in hiera.
First run everything is fine, archive is downloaded and extracted.
So days later we updated the archive on the webserver and the md5sum in hiera.
The md5sum is created correctly as the new one, but the file isn't downloaded again, because the exec-resource is only firing if no downloaded file is present (see 'creates' below).
exec {"download archive ${name} and check sum":
command => "curl ${proxy_option} -s -S ${insecure_arg} ${redirect_arg} -o ${src_target}/${name} '${url}'",
creates => "${src_target}/${name}",
logoutput => true,
timeout => $timeout,
path => $path,
require => Package['curl'],
notify => $_notify,
user => $user,
refreshonly => $refreshonly,
}
So the checksum checks went wrong and everything is deleted.
On the second puppet run everything is running fine, since nothing is present on local disk.
We have an archive resource like this:
$::oracle_patch_md5sum is defined in hiera.
First run everything is fine, archive is downloaded and extracted.
So days later we updated the archive on the webserver and the md5sum in hiera.
The md5sum is created correctly as the new one, but the file isn't downloaded again, because the exec-resource is only firing if no downloaded file is present (see 'creates' below).
So the checksum checks went wrong and everything is deleted.
On the second puppet run everything is running fine, since nothing is present on local disk.