FAQ
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???

--
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/-/x-JSPBvHsaQJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Nan Liu at Jan 22, 2013 at 8:59 pm

    On Tue, Jan 22, 2013 at 2:53 PM, GregC wrote:

    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???
    See puppetlabs-stdlib module validate_* functions.

    Nan

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJan 22, '13 at 8:53p
activeJan 22, '13 at 8:59p
posts2
users2
websitepuppetlabs.com

2 users in discussion

GregC: 1 post Nan Liu: 1 post

People

Translate

site design / logo © 2022 Grokbase