On Sat, Jun 27, 2009 at 04:54:44PM +0200, Peter Meier wrote: > > Hi > > > exec { "sources": > > command => "sudo gem sources -a http://gems.github.com/ > > > /tmp/githubadded", > > creates => "/tmp/githubadded" > > } > > > > I hope that's the right way to do it... > > > I would rather do: > > exec { "sources": > command => "sudo gem sources -a http://gems.github.com/", > unless => 'gem source -l | grep -q gems.github.com', > } > > which is more idempotent. > > /tmp is thought only for temporary files. on the different systems this > file will be missing after a certain amount of time or after a reboot. > hence puppet would rerun the exec again.
Also, if "gem sources -a" fails, it would not be retried until next /tmp cleanup. -- Marcin Owsiany <mar...@owsiany.pl> http://marcin.owsiany.pl/ GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216 "Every program in development at MIT expands until it can read mail." -- Unknown --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---