Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

how to get a binary file to stop the install if exist

$
0
0
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 }

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>