Hi, since Puppet 3.5.0 there is a feature that will allow you to do just that, courtesy of Erik Dalen.
http://docs.puppetlabs.com/references/3.5.0/type.html#file-attribute-validate_cmd So you can file { "/etc/dhcp/dhcpd.conf": validate_cmd => "/path/to/dhcpd -t -q -cf %" } and Puppet will take care of (not) overwriting the actual config. HTH, Felix On 06/05/2014 11:58 PM, Matt Zagrabelny wrote: > What is the community's opinion/experience with performing some sort > of validation check before puppet drives out a config and restarts a > service? > > I'm thinking of things like ISC DHCP where you can test the > correctness of a config: > > dhcpd -t -q -cf /etc/dhcp/dhcpd.conf && cp > /some/staging/area/dhcpd.conf /etc/dhcp/dhcpd.conf > > Thanks for any hints! > > -mz -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/53917187.90405%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/d/optout.
