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? Thanks Jan Hebler PS. Sorry for my bad english
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@csub.edu> Network Analyst California State University, Bakersfield John Birch Society: That pathetic manifestation of organized apoplexy. -- Edward P. Morgan
Russell Jackson schrieb:> 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. >Thats too bad because i want to use puppet as the source for Files> 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. >This is true for the current example, but i have a Bunch of other Tasks like Oracle-patches, Software that is delivered as shar and so on. bye Jan
--On Saturday, October 27, 2007 9:01 AM +0200 Jan Hebler <jan@hebler.de> 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? > > Thanks > > Jan Hebler > > PS. Sorry for my bad english > > > > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-usersIt doesn''t seem like puppet really has a type what you are doing. Puzzling. Maybe there is a different want to think about this problem?
Reasonably Related Threads
- Configuration help
- ssm vs. lvm: moving physical drives and volume group to another system
- ssm vs. lvm: moving physical drives and volume group to another system
- Revealing linux quota to windows users?
- Bug report: "exclude from" in rsyncd.conf is not effective.