Hi all,
I am new to Puppet and I'm trying to accomplish a fairly simple task. I need to deploy a folder to the server and, once it's copied, I need to run a shell script in that folder.
Basically I have something like this:
file { "/home/user/res":
ensure => "directory",
owner => "user",
group => "user",
recurse => "true",
ignore => ["logs", "downloads"],
purge => "true",
mode => "0750",
source => "puppet:///files/res/",
}
exec { "start_res":
command => "/home/user/res/run.sh"
}
File['/home/user/res'] -> Exec['start_res']
The problem is that the deploymnet of the res folder is not treated atomically. So once a few of the files have been copied, puppet tries to execute the run.sh script which is not there at that moment.
Is there any way I can make sure that run.sh is executed only after the deployment of the folder has finished?
Thanks!
S.