1

I would like to run below command in puppet at one time for example if i had a one directory(/tmp/example) which contains example-releases-88.99.05-rc1.tar.gz file only coming at certain point. Only on that time need to move new name(example-releases-stable.tar.gz) and extarct it, otherwise example-releases-stable.tar.gz will not move at any time.

exec { 'fetching_example_tarball':
  cwd     => '/tmp/example',
  command =>  "mv /tmp/example/example-releases-* /tmp/example/example-releases-stable.tar.gz && sleep 5m"
  path    => ['/usr/bin', '/usr/sbin',],
}

Above snippet running only when the file creates example-releases-88.99.05-rc1.tar.gz otherwise need to skip.

The problem is second time while running puppet getting error because of move command throw error like same file not able to move.

Could you please help on that ?

Thanks,

0 Answers0