[Puppet Users] [puppet Users]: Run this only once
http://123maza.com/65/peepul667/ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Run this only once!!
On Tue, 12 Jul 2011 13:43:45 -0700, vella1tj wrote: > > package { 'Bindscript20100601.dmg': > provider => pkgdmg, > ensure => installed, > source => 'temp/location/rightnow/Bindscript20100601.dmg', > } > > Seems to work fine I return this once it runs "notice: > //Package[Bindscript20100601.pkg.dmg]/ensure: created" > > So it will only run once on the machine? > Correct. As long as the file that Nigel pointed out remains there, it won't try to install the .dmg again. -- Jacob Helwig , | Join us for PuppetConf, September 22nd and 23rd in Portland, OR | http://bit.ly/puppetconfsig ` signature.asc Description: Digital signature
Re: [Puppet Users] Run this only once!!
On Tue, Jul 12, 2011 at 1:37 PM, Jacob Helwig wrote: > > This shouldn't actually be necessary. The pkgdmg provider should keep > track of which things it's installed, so it won't keep trying to install > the .dmg on every run. > > and for further detail, due to OS X not having a real package management system, the way Puppet works out if a package was installed is by dropping a .puppet_pkgdmg_ file in /var/db -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Run this only once!!
package { 'Bindscript20100601.dmg': provider => pkgdmg, ensure => installed, source => 'temp/location/rightnow/Bindscript20100601.dmg', } Seems to work fine I return this once it runs "notice: //Package[Bindscript20100601.pkg.dmg]/ensure: created" So it will only run once on the machine? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/QTeXJzyTz8YJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Run this only once!!
On Tue, 12 Jul 2011 13:19:34 -0700, vella1tj wrote: > > Hi, I am trying run a package once and when it completes I want my > manifest to create a touch file and from that file being placed there > it will not run again. I have this so far, but have been running into > syntax problems/invalid parameters. > > > #Package to install > package { 'Bindscript20100601.dmg': >provider=> pkgdmg, >ensure => installed, >source => 'temp/location/rightnow/Bindscript20100601.dmg', >notify => [Exec['blahblah']], >onlyif => "test -e /var/db/.bindscript", > } > exec {'blahblah': >command =>'touch /var/db/.bindscript', >path=>['/usr/bin'] > } > > If you need more information please ask. > Couple of things. onlyif is only valid on exec resources. This shouldn't actually be necessary. The pkgdmg provider should keep track of which things it's installed, so it won't keep trying to install the .dmg on every run. Is the following resource definition not working for you? package { 'Bindscript20100601.dmg': provider => pkgdmg, ensure => installed, source => 'temp/location/rightnow/Bindscript20100601.dmg', } -- Jacob Helwig , | Join us for PuppetConf, September 22nd and 23rd in Portland, OR | http://bit.ly/puppetconfsig ` signature.asc Description: Digital signature
[Puppet Users] Run this only once!!
Hi, I am trying run a package once and when it completes I want my manifest to create a touch file and from that file being placed there it will not run again. I have this so far, but have been running into syntax problems/invalid parameters. #Package to install package { 'Bindscript20100601.dmg': provider=> pkgdmg, ensure => installed, source => 'temp/location/rightnow/Bindscript20100601.dmg', notify => [Exec['blahblah']], onlyif => "test -e /var/db/.bindscript", } exec {'blahblah': command =>'touch /var/db/.bindscript', path=>['/usr/bin'] } If you need more information please ask. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.