Giter Site home page Giter Site logo

ansible-network_static_route's Introduction

Network static routes configuration

Ansible role that configures static routes for networking devices.

The configuration of the role is done so that it shouldn't be necessary to modify the role for any configuration. All settings can be configured by changing role parameters or by declaring new config as variable.

Please report any issues or send PR.

Details from modules used: Cisco NX-OS uses the default VRF for routes if none is defined. VRF names must be shorter than 32 characters and not case sensitive.

Examples

---

- name: Example of how to add a static route
  hosts: switches
  vars:
    static_routes:
      - prefix: 0.0.0.0/0
        state: present
        next_hop: 192.168.1.1
  roles:
    - Ansible-network_static_route

- name: Example of how to add a couple static routes with next hop name, route tag, admin distance and in specific vrf
  hosts: switches
  vars:
    static_routes:
      - prefix: 0.0.0.0/0
        route_tag: 22
        state: present
        next_hop: 192.168.12.1
        nh_name: oob_switch
        admin_distance: 100
        vrf: mgmt
      - prefix: 10.55.12.0/24
        route_tag: 10
        state: present
        next_hop: 10.11.1.1
        nh_name: firewall
        admin_distance: 100
        vrf: prod
  roles:
    - Ansible-network_static_route


- name: Example of how to remove a static route
  hosts: switches
  vars:
    static_routes:
      - prefix: 0.0.0.0/0
        state: absent
        next_hop: 192.168.1.1
  roles:
    - Ansible-network_static_route

Role variables

# Define the static routes to be configured (see README for examples)
static_routes: { }

License

Apache

Author

Dan Murarasu

ansible-network_static_route's People

Contributors

dmurarasu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.