I have a pp
manifest like this:
vcsrepo { '/home/pi/pop_machine':
ensure => latest,
provider => git,
source => 'https://github.com/kirkins/pop-machine-demo.git',
revision => 'master',
}
exec { 'npm start':
command => "/usr/bin/killall electron & /usr/bin/npm start",
cwd => "/home/pi/pop_machine/",
}
I want the exec
resource to restart the device application only if the vcsrepo
resource found an update on github and made changes.
Would this be possible with puppet alone, or should I write a bash script to check the last time the .git
folder was updated?