Check the creates in the exec documentation. It will make the exec type
to execute as long as the file *doesn't*exist


-- 
Nikola

On Sun, Feb 24, 2013 at 11:04:16PM -0800, yarlagadda ramya wrote:
> Hi all,
> This is the class i have written for downloading and installing jdk....now 
> i want to apply a condition using if for it such that...this downloads the 
> file and installs it only if the jdk1.6.0_24.tar.gz file is not present in 
> the specified directory...am trying for it...but not getting..can any one 
> plsss help me with this....
> class maininstall {
> $software = "/app/tcs/puppetdemo/software"
> $server = "/app/tcs/puppetdemo/server"
> $URL = "http://192.168.24.171:8080/softwares/jdk1.6.0_24.tar.gz";
> $file = "/app/tcs/puppetdemo/software/"
> 
> exec{"download_jdk":
>       command => "/usr/bin/wget $URL",
>       cwd => "$software",
> }
> 
> exec {"untar_jdk":
>        command => "/bin/tar -C /app/tcs/puppetdemo/server/ -zxf 
> /app/tcs/puppetdemo/software/jdk1.6.0_24.tar.gz",
>        cwd => "$server",
> }
> 
> Exec['download_jdk'] -> Exec['untar_jdk']
> 
> }
> 
> 
> 
> 
> 
> }
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to