On Sep 14, 2011, at 8:24 PM, Jon Forrest wrote: > On 9/14/2011 1:58 PM, Dominik Zyla wrote: > >> named-checkzone(8) should be suitable tool for your needs. > > I already knew that. To repeat, what I'm trying to find out > is a way to get an expanded template without doing a full > run of puppet. I could then run named-checkzone on that > and then do a regular run. > > In fact, this is only a special case of the more > general problem of getting access to any file generated > by a puppet run without actually putting the files > in the ultimate destination. In other words, it would > be like a --test run except files will be generated and > kept. ---- I use /etc/puppet/deployment_files for situations such as this. Puppet pseudo code...
file {/etc/puppet/deployment_files/zone_name source => puppet:///modules/bind/zone_name.erb notify => Exec["zone_name.un-deploy"] exec {"zone_name.un-deploy" /bin/rm "/etc/puppet/deployment_files/zone_name.deployed" exec {"zone_name.deploy" touch "/etc/puppet/deployment_files/zone_name.deployed" notify => Exec["test - deploy if test successful"] exec {"test - deploy if test successful" command => cat /etc/puppet/deployment_files/zone_name unless => bind-checkzone /etc/puppet/deployment_files/zone_name > 0 AND ls ! /etc/puppet/deployment_files/zone_name.deployed require => File["/etc/puppet/deployment_files/zone_name"] notify => [ Class["bind::service"], Exec["zone_name.deploy"] ] That's not all - you might want some notice statements but that's the general idea anyway. Craig -- 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.