Groups
Groups
Sign in
Groups
Groups
Puppet Users
Conversations
About
Send feedback
Help
service config file validation?
18 views
Skip to first unread message
Matt Zagrabelny
unread,
Jun 5, 2014, 5:59:16 PM
6/5/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
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
Felix Frank
unread,
Jun 6, 2014, 3:45:24 AM
6/6/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages