Puppet -the file type: copying files

asked 2018-11-15 12:40:02 -0600

Dan1 gravatar image


Is there any option to preserve the original timestamp (date modified) when copying a file? An example: I'm copying files from folder A to folder B, after I copy the files I expect that in folder B I will find the same files from folder A with the same date modified (timestamp) (let's suppose that folder B is empty before the copying). Actually, I noticed that in folder B I get the current time , and not the same date the I have in folder A.

How can I get the original timestamp in folder B?(the same date modified)

I am sharing my code,

  file {
#set the BL run time folder and update it according to the source folder
$bl_deployment_folder :
  ensure    => directory,
  source    => $bl_source_folder,
  recurse   => true,
  purge     => true,
  ignore    => "Config.ini",
  notify    => Exec["start_srv_${name}"]; 
#set the BL config file accorgind to the template  
  ensure    => present,
  notify    => Exec["start_srv_${name}"];


Thanks a lot!

edit retag flag offensive close merge delete