|
Re: download, run and delete file: msg#00290sysutils.puppet.user
Jan Hebler wrote: > Hello > > I try the following: > 1. Check if a file is present > 2. if not, download some files to an directory in /tmp and run one > 3. remove the files and the directoy from /tmp > > 1 and 2 are easy, here is my definition: > > class netcool > { > > exec { "/bin/bash /tmp/netcool/silentinstall.sh": > cwd => "/tmp/netcool", > path => "/usr/bin:/usr/sbin:/bin:/sbin", > creates => "/opt/netcool/ssm/bin/init.nco_m_ssmagent", > require => File["/tmp/netcool"] > } > file { "/tmp/netcool": > source => "puppet://10.32.29.29/dist/os/linux/netcool", > backup => false, > mode => 644, > owner => root, > group => root, > recurse => true > } > } > > > that works so far. But if i (manually) delete /tmp/netcool, the next > time i run puppet, it will downloaded again. Is there a > Way to get rid of these Files? > You probably shouldn't use a file resource to fetch the distributable. Use an exec to do both the copying of the installation files and to install it. When you manage a file/directory with a file resource, it kinda becomes permanent. I think the proper way to do it would be to create a package wrapper for whatever OS you're using (RPM, DPKG, etc...) and manage it with a package resource. -- Russell A. Jackson <raj@xxxxxxxx> Network Analyst California State University, Bakersfield John Birch Society: That pathetic manifestation of organized apoplexy. -- Edward P. Morgan |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Managing R packages under Linux: 00290, Lance A. Brown |
|---|---|
| Next by Date: | Re: freebsd service management redux: 00290, Russell Jackson |
| Previous by Thread: | download, run and delete filei: 00290, Jan Hebler |
| Next by Thread: | openvpn recipe: comments, suggestions, help: 00290, Adrian Phillips |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |