If you're using this wget module https://github.com/liquidstate/puppet-wget/blob/master/manifests/init.pp
It's set to not run so long as the destination is still there, so /tmp/Python-${version}.tgz needs to stick around. I'm not sure which archive module you're using, but as long as you have that require there, it should follow. On Friday, October 26, 2012 6:55:32 AM UTC-7, Dave Mankoff wrote: > > Howdy. I feel like I am missing something really simply with regards to > the way that Puppet works and I am wondering if someone can point me in the > write direction. > > I have written a class that downloads, uncompresses, compiles, and > installs Python from source. So far so good. The problem is that it only > needs to do this once, when Python is not already in place (or some other > custom indicator of the Python version). I have my 3 calls to exec doing > their checks just fine, but my calls to wget::fetch and archive::untar both > fire during every apply. Specifically, archive::untar takes about 30 > seconds to run and I'd prefer it if it only ran conditionally. > > What is the best way to make sure that this code: > > wget::fetch { "python-${version}": > source => " > http://python.org/ftp/python/${version}/Python-${version}.tgz", > destination => "/tmp/Python-${version}.tgz", > } > > archive::untar {"/tmp/python-${version}": > source => "/tmp/Python-${version}.tgz", > compression => 'gz', > rootdir => "Python-${version}", > require => Wget::Fetch["python-${version}"], > } > > only runs when some condition is met? I can easily put a custom file in > place to look for, but how do I make these commands dependent on its > absence? I tried making such a file and subscribing to it, but these > commands still ran each time. > -- 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/-/M1fFodRbPxkJ. 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.