Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.
This repository was archived by the owner on Jan 8, 2020. It is now read-only.

Archive won't be re-downloaded when md5sum and archive on server is updated #72

Description

@jgrumboe

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions