Puppet Bonding Module: Detect missing values before creation of file or template

37 views
Skip to first unread message

GregC

unread,
Jan 22, 2013, 3:53:50 PM1/22/13
to puppet...@googlegroups.com
I have a module that reads and creates bonding configuration with  persistent routes, by pulling those values and inserting into my static route file on RH 5.6 like so:

<% bond_route.each do |bond_route| -%>
<%= bond_route %> via <%= bond_gateway %> dev bond<%= name %>
<%end -%>

Problem is that if I am missing any values for bond_route or bond_gateway it will create the template with those values missing. I can do a puppet run by giving it a blank value like so:

bond1_route = ""

Does anyone have a suggestions as to how I can detect and NOT execute this module if the any variables are missing???

Nan Liu

unread,
Jan 22, 2013, 3:58:42 PM1/22/13
to puppet...@googlegroups.com
See puppetlabs-stdlib module validate_* functions. 

Nan
Reply all
Reply to author
Forward
0 new messages