FAQ
Hello all,

Is anyone managing custom static routes via puppet? if so, how?

I'm wondering if there's a better cross-platform way of adding routes than a custom init script that defines the routes that need to be associated with each interface…

or maybe someone with extra tasty brains (zombies will like them even more) has a defined type that can already do the fu necessary for debian/rhel flavors of routing, and I just haven't found it yet...

Thoughts?






________________________________

This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you.

--
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.

Search Discussions

  • Luke Bigum at Dec 4, 2012 at 8:09 pm

    On Tuesday, December 4, 2012 7:52:20 PM UTC, Wolf Noble wrote:

    Hello all,

    Is anyone managing custom static routes via puppet? if so, how?
    Yes, along with all other networking config files (Red Hat based ifcfg-*
    files).

    We started with this module: https://github.com/heliostech/puppet-network

    And then added routes and rules on our own.

    We only have it managing the file content, we don't attempt to restart
    networking or repair the properties of existing networks, routes, etc. So
    it's not too much of an improvement over just using File resources to copy
    out templates.

    I'm wondering if there's a better cross-platform way of adding routes than
    a custom init script that defines the routes that need to be associated
    with each interface…

    or maybe someone with extra tasty brains (zombies will like them even
    more) has a defined type that can already do the fu necessary for
    debian/rhel flavors of routing, and I just haven't found it yet...

    Thoughts?






    ________________________________

    This message may contain confidential or privileged information. If you
    are not the intended recipient, please advise us immediately and delete
    this message. See http://www.datapipe.com/legal/email_disclaimer/ for
    further information on confidentiality and the risks of non-secure
    electronic communication. If you cannot access these links, please notify
    us by reply message and we will send the contents to you.
    --
    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/-/dUdwgEBREDcJ.
    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.
  • Aaron Grewell at Dec 4, 2012 at 8:14 pm
    I'm doing RHEL routes this way. It's not what I'd call elegant, but it
    allows me to keep the approach the same between RHEL and Solaris which is
    handy. I'm not familiar with how the Debian derivatives do static routing
    so I'm not sure if it would be similar.

    class network::routes::linux {
    $static_route_int = hiera('static_route_int')
    $static_route_ints = split("$static_route_int",',')

    network::routes::int { $static_route_ints: }
    }

    define network::routes::int(){
    $routes = hiera("static_routes_${name}")

    file {"/etc/sysconfig/network-scripts/route-${name}":
    content => "$routes",
    }

    exec {"/etc/sysconfig/network-scripts/ifup-routes ${name}":
    refreshonly => true,
    subscribe => File["/etc/sysconfig/network-scripts/route-${name}"],
    }
    }

    # Role yaml file contents for hiera uses multiline yaml syntax with "|"
    # Interface list can be comma-separated "eth0,eth1" if routes are needed
    # per interface

    static_route_int: "eth0"
    static_routes_eth0: |
    # This file is being managed by Puppet - DO NOT EDIT

    ## Network Routes
    #
    -net 172.0.0.0/16 172.0.0.1
    -net 192.168.1.0/24 192.168.1.1

    ## Host Routes
    #
    -host 10.1.1.1 172.0.0.1
    -host 10.1.1.2 172.0.0.1


    On Tue, Dec 4, 2012 at 11:52 AM, Wolf Noble wrote:

    Hello all,

    Is anyone managing custom static routes via puppet? if so, how?

    I'm wondering if there's a better cross-platform way of adding routes than
    a custom init script that defines the routes that need to be associated
    with each interface…

    or maybe someone with extra tasty brains (zombies will like them even
    more) has a defined type that can already do the fu necessary for
    debian/rhel flavors of routing, and I just haven't found it yet...

    Thoughts?






    ________________________________

    This message may contain confidential or privileged information. If you
    are not the intended recipient, please advise us immediately and delete
    this message. See http://www.datapipe.com/legal/email_disclaimer/ for
    further information on confidentiality and the risks of non-secure
    electronic communication. If you cannot access these links, please notify
    us by reply message and we will send the contents to you.

    --
    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.
    --
    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
postedDec 4, '12 at 7:52p
activeDec 4, '12 at 8:14p
posts3
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase