New in version 2.4.
parameter | required | default | choices | comments |
---|---|---|---|---|
active | no | True |
| Specifies whether or not the configuration is active or deactivated |
address | yes | Network address with prefix of the static route. aliases: prefix | ||
aggregate | no | List of static route definitions | ||
next_hop | yes | Next hop IP of the static route. | ||
preference | no | Global admin preference of the static route. aliases: admin_distance | ||
qualified_next_hop | no | Qualified next hop IP of the static route. Qualified next hops allow to associate preference with a particular next-hop address. | ||
qualified_preference | no | Assign preference for qualified next hop. | ||
state | no | present |
| State of the static route configuration. |
- name: configure static route junos_static_route: address: 192.168.2.0/24 next_hop: 10.0.0.1 preference: 10 qualified_next_hop: 10.0.0.2 qualified_preference: 3 state: present - name: delete static route junos_static_route: address: 192.168.2.0/24 state: absent - name: deactivate static route configuration junos_static_route: address: 192.168.2.0/24 next_hop: 10.0.0.1 preference: 10 qualified_next_hop: 10.0.0.2 qualified_preference: 3 state: present active: False - name: activate static route configuration junos_static_route: address: 192.168.2.0/24 next_hop: 10.0.0.1 preference: 10 qualified_next_hop: 10.0.0.2 qualified_preference: 3 state: present active: True - name: Configure static route using aggregate junos_static_route: aggregate: - { address: 4.4.4.0/24, next_hop: 3.3.3.3, qualified_next_hop: 5.5.5.5, qualified_preference: 30 } - { address: 5.5.5.0/24, next_hop: 6.6.6.6, qualified_next_hop: 7.7.7.7, qualified_preference: 12 } preference: 10 - name: Delete static route using aggregate junos_static_route: aggregate: - address: 4.4.4.0/24 - address: 5.5.5.0/24 state: absent
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
diff.prepared | Configuration difference before and after applying change. | when configuration is changed and diff option is enabled. | string | [edit routing-options static] route 2.2.2.0/24 { ... } + route 4.4.4.0/24 { next-hop 3.3.3.3; qualified-next-hop 5.5.5.5 { + preference 30; } + preference 10; + } |
Note
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For more information about Red Hat’s this support of this module, please refer to this knowledge base article<https://access.redhat.com/articles/rhel-top-support-policies>
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/junos_static_route_module.html