I have a binary file to install called install.sh on the master under /data/binary, I need to fix my code to only install it if the file exist and want to have it only copy the file if the agent is not installed.
I am not sure how my onlyif should look like, as if now, if only check the file if exist but puppet the ensure already doing that.
1 class profile: epo {
2
3 file { '/tmp/install.sh':
4 ensure => 'file',
5 source => 'puppet:///binaries/install.sh',
6 notify => Exec['somthing'],
7 }
8 exec { 'something':
9 command => '/tmp/install.sh',
10 onlyif => '/usr/bin/test -e /tmp/install.sh',,
11 }
12 }
↧