voxpupuli/puppet-archive

Automatic trigger by update of remote resource

Closed this issue · 2 comments

Hello,

for me it would be nice to got a feature that archive update the defined file, if the remote ressource was changing. I got no technical solution for it yet, cause it will be required that some fact is stored somewhere. e.g. the ETag flag from the header of the remote resource.

As I saw in the internet there're many workarounds for this. A build-in solution would be just perfect.
To illustrate the issue:

  archive { '/usr/lib/check_mk_agent/plugins/mk_postgres':
    source  => "${check_mk_url}/check_mk/agents/plugins/mk_postgres",
    extract => false,
    user    => 'root',
    group   => 'root',
  }

  exec { 'set mk_postgres permission':
    command     => 'chmod u+x /usr/lib/check_mk_agent/plugins/mk_postgres',
    path        => ['/bin', '/usr/bin',],
    refreshonly => true,
    subscribe   => Archive['/usr/lib/check_mk_agent/plugins/mk_postgres'],
  }

So if the remote was updated, the applied mk_postgres will never changed. I'd to avoid a hard coded checksum in manifest and preferring to set a Flag ETAG_verify to true or something like that.

The ETAG Flag in the header is changing when the file was changed.

< ETag: "401d59-738-581273455b255"
kenyon commented

Same as #367.