diff options
Diffstat (limited to 'plugins/modules/vyos_static_routes.py')
-rw-r--r-- | plugins/modules/vyos_static_routes.py | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/plugins/modules/vyos_static_routes.py b/plugins/modules/vyos_static_routes.py index df9c501e..76fccaf9 100644 --- a/plugins/modules/vyos_static_routes.py +++ b/plugins/modules/vyos_static_routes.py @@ -31,15 +31,22 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type +ANSIBLE_METADATA = { + "metadata_version": "1.1", + "status": ["preview"], + "supported_by": "network", +} DOCUMENTATION = """ +--- module: vyos_static_routes +version_added: '1.0.0' short_description: Static routes resource module description: This module manages attributes of static routes on VyOS network devices. -version_added: 1.0.0 notes: -- Tested against VyOS 1.1.8 (helium). -- This module works with connection C(ansible.netcommon.network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html). +- Tested against VyOS 1.3.8. +- This module works with connection C(ansible.netcommon.network_cli). + See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html). author: - Rohit Thakur (@rohitthakur2590) options: @@ -163,7 +170,6 @@ EXAMPLES = """ - forward_router_address: '2001:db8:2000:2::1' - forward_router_address: '2001:db8:2000:2::2' state: merged - # # # ------------------------- @@ -708,12 +714,12 @@ EXAMPLES = """ - address_families: - afi: ipv6 routes: - - dest: 2001:db8:1000::/36 + - dest: '2001:db8:1000::/36' blackhole_config: distance: 2 next_hops: - - forward_router_address: 2001:db8:2000:2::1 - - forward_router_address: 2001:db8:2000:2::2 + - forward_router_address: '2001:db8:2000:2::1' + - forward_router_address: '2001:db8:2000:2::2' state: rendered # # @@ -739,13 +745,13 @@ EXAMPLES = """ # - name: Parse the provided running configuration vyos.vyos.vyos_static_routes: - running_config: - "set protocols static route 192.0.2.32/28 'blackhole' - set protocols static route 192.0.2.32/28 next-hop '192.0.2.6' - set protocols static route 192.0.2.32/28 next-hop '192.0.2.7' - set protocols static route6 2001:db8:1000::/36 blackhole distance '2' - set protocols static route6 2001:db8:1000::/36 next-hop '2001:db8:2000:2::1' - set protocols static route6 2001:db8:1000::/36 next-hop '2001:db8:2000:2::2'" + running_config: | + set protocols static route 192.0.2.32/28 'blackhole' + set protocols static route 192.0.2.32/28 next-hop '192.0.2.6' + set protocols static route 192.0.2.32/28 next-hop '192.0.2.7' + set protocols static route6 2001:db8:1000::/36 blackhole distance '2' + set protocols static route6 2001:db8:1000::/36 next-hop '2001:db8:2000:2::1' + set protocols static route6 2001:db8:1000::/36 next-hop '2001:db8:2000:2::2' state: parsed # # @@ -878,14 +884,14 @@ RETURN = """ before: description: The configuration prior to the model invocation. returned: always - type: list + type: dict sample: > The configuration returned will always be in the same format of the parameters above. after: description: The resulting configuration model invocation. returned: when changed - type: list + type: dict sample: > The configuration returned will always be in the same format of the parameters above. @@ -896,6 +902,7 @@ commands: sample: - "set protocols static route 192.0.2.32/28 next-hop '192.0.2.6'" - "set protocols static route 192.0.2.32/28 'blackhole'" + """ @@ -930,6 +937,7 @@ def main(): supports_check_mode=True, mutually_exclusive=mutually_exclusive, ) + result = Static_routes(module).execute_module() module.exit_json(**result) |