Ask Your Question

Revision history [back]

Yes, you can do something like so:

file { '/opt/staging/webapps/test.war':
  ensure   => file,
  checksum => 'mtime',
  source   => 'puppet:///modules/deployfiles/test.war',
}

The checksum attribute can be very useful for modifying the file resource's idea of "changed": https://docs.puppetlabs.com/references/latest/type.html#file-attribute-checksum