From 7616725ac821eea33e1d7e3908ea338e0f42e880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Moser?= Date: Thu, 1 Dec 2016 11:48:40 +0100 Subject: doc: network: fix syntax errors in examples (#5780) --- network/eos/eos_eapi.py | 6 +++--- network/nxos/nxos_aaa_server_host.py | 10 +++++----- network/nxos/nxos_igmp_snooping.py | 4 ++-- network/nxos/nxos_mtu.py | 24 ++++++++++++------------ network/nxos/nxos_ntp.py | 6 +++--- network/nxos/nxos_ntp_auth.py | 6 +++--- network/nxos/nxos_ntp_options.py | 6 +++--- network/nxos/nxos_nxapi.py | 6 +++--- network/nxos/nxos_pim_interface.py | 24 ++++++++++++------------ network/nxos/nxos_snmp_community.py | 6 +++--- network/nxos/nxos_snmp_contact.py | 6 +++--- network/nxos/nxos_snmp_host.py | 6 +++--- network/nxos/nxos_snmp_location.py | 12 ++++++------ network/nxos/nxos_snmp_traps.py | 12 ++++++------ network/nxos/nxos_snmp_user.py | 6 +++--- network/nxos/nxos_udld.py | 12 ++++++------ network/nxos/nxos_udld_interface.py | 18 +++++++++--------- network/nxos/nxos_vtp_domain.py | 6 +++--- network/nxos/nxos_vtp_password.py | 12 ++++++------ network/nxos/nxos_vtp_version.py | 6 +++--- network/sros/sros_config.py | 2 +- 21 files changed, 98 insertions(+), 98 deletions(-) diff --git a/network/eos/eos_eapi.py b/network/eos/eos_eapi.py index 8087a8d0..96ad4ee5 100644 --- a/network/eos/eos_eapi.py +++ b/network/eos/eos_eapi.py @@ -148,7 +148,7 @@ vars: - name: Enable eAPI access with default configuration eos_eapi: state: started - provider: {{ cli }} + provider: "{{ cli }}" - name: Enable eAPI with no HTTP, HTTPS at port 9443, local HTTP at port 80, and socket enabled eos_eapi: @@ -158,12 +158,12 @@ vars: local_http: yes local_http_port: 80 socket: yes - provider: {{ cli }} + provider: "{{ cli }}" - name: Shutdown eAPI access eos_eapi: state: stopped - provider: {{ cli }} + provider: "{{ cli }}" """ RETURN = """ diff --git a/network/nxos/nxos_aaa_server_host.py b/network/nxos/nxos_aaa_server_host.py index 28f24f86..9cfcd004 100644 --- a/network/nxos/nxos_aaa_server_host.py +++ b/network/nxos/nxos_aaa_server_host.py @@ -88,9 +88,9 @@ EXAMPLES = ''' address: 1.2.3.4 acct_port: 2084 host_timeout: 10 - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" # Radius Server Host Key Configuration - name: "Radius Server Host Key Configuration" @@ -101,8 +101,8 @@ EXAMPLES = ''' key: hello encrypt_type: 7 host: inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + username: "{{ un }}" + password: "{{ pwd }}" # TACACS Server Host Configuration - name: "Tacacs Server Host Configuration" diff --git a/network/nxos/nxos_igmp_snooping.py b/network/nxos/nxos_igmp_snooping.py index 8b8ad662..c1ee7c9b 100644 --- a/network/nxos/nxos_igmp_snooping.py +++ b/network/nxos/nxos_igmp_snooping.py @@ -86,8 +86,8 @@ EXAMPLES = ''' report_supp: true v3_report_supp: true host: "{{ inventory_hostname }}" - username: {{ un }} - password: {{ pwd }} + username: "{{ un }}" + password: "{{ pwd }}" ''' RETURN = ''' diff --git a/network/nxos/nxos_mtu.py b/network/nxos/nxos_mtu.py index 26fccca6..58942a27 100644 --- a/network/nxos/nxos_mtu.py +++ b/network/nxos/nxos_mtu.py @@ -57,33 +57,33 @@ EXAMPLES = ''' # Ensure system mtu is 9126 - nxos_mtu: sysmtu: 9216 - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" # Config mtu on Eth1/1 (routed interface) - nxos_mtu: interface: Ethernet1/1 mtu: 1600 - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" # Config mtu on Eth1/3 (switched interface) - nxos_mtu: interface: Ethernet1/3 mtu: 9216 - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" # Unconfigure mtu on a given interface - nxos_mtu: interface: Ethernet1/3 mtu: 9216 - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" state: absent ''' diff --git a/network/nxos/nxos_ntp.py b/network/nxos/nxos_ntp.py index 18cbe2b1..f99f1876 100644 --- a/network/nxos/nxos_ntp.py +++ b/network/nxos/nxos_ntp.py @@ -81,9 +81,9 @@ EXAMPLES = ''' server: 1.2.3.4 key_id: 32 prefer: enabled - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" ''' RETURN = ''' diff --git a/network/nxos/nxos_ntp_auth.py b/network/nxos/nxos_ntp_auth.py index 9790389b..e6652e1b 100644 --- a/network/nxos/nxos_ntp_auth.py +++ b/network/nxos/nxos_ntp_auth.py @@ -77,9 +77,9 @@ EXAMPLES = ''' key_id: 32 md5string: hello auth_type: text - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" ''' RETURN = ''' diff --git a/network/nxos/nxos_ntp_options.py b/network/nxos/nxos_ntp_options.py index fbc1cd57..26a28523 100644 --- a/network/nxos/nxos_ntp_options.py +++ b/network/nxos/nxos_ntp_options.py @@ -66,9 +66,9 @@ EXAMPLES = ''' master: true stratum: 12 logging: false - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" ''' RETURN = ''' diff --git a/network/nxos/nxos_nxapi.py b/network/nxos/nxos_nxapi.py index 3324130b..f8144aba 100644 --- a/network/nxos/nxos_nxapi.py +++ b/network/nxos/nxos_nxapi.py @@ -112,7 +112,7 @@ vars: - name: Enable NXAPI access with default configuration nxos_nxapi: - provider: {{ cli }} + provider: "{{ cli }}" - name: Enable NXAPI with no HTTP, HTTPS at port 9443 and sandbox disabled nxos_nxapi: @@ -120,12 +120,12 @@ vars: https_port: 9443 https: yes enable_sandbox: no - provider: {{ cli }} + provider: "{{ cli }}" - name: remove NXAPI configuration nxos_nxapi: state: absent - provider: {{ cli }} + provider: "{{ cli }}" """ RETURN = """ diff --git a/network/nxos/nxos_pim_interface.py b/network/nxos/nxos_pim_interface.py index 9556b03a..6a627565 100644 --- a/network/nxos/nxos_pim_interface.py +++ b/network/nxos/nxos_pim_interface.py @@ -110,9 +110,9 @@ EXAMPLES = ''' - nxos_pim_interface: interface: eth1/33 state: absent - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" # ensure the interface has pim-sm enabled with the appropriate priority and hello interval - nxos_pim_interface: @@ -120,9 +120,9 @@ EXAMPLES = ''' dr_prio: 10 hello_interval: 40 state: present - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" # ensure join-prune policies exist - nxos_pim_interface: @@ -131,17 +131,17 @@ EXAMPLES = ''' jp_policy_out: JPOUT jp_type_in: routemap jp_type_out: routemap - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" # ensure defaults are in place - nxos_pim_interface: interface: eth1/33 state: default - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" ''' RETURN = ''' diff --git a/network/nxos/nxos_snmp_community.py b/network/nxos/nxos_snmp_community.py index 5abc428f..7ffe7b46 100644 --- a/network/nxos/nxos_snmp_community.py +++ b/network/nxos/nxos_snmp_community.py @@ -62,9 +62,9 @@ EXAMPLES = ''' community: TESTING7 group: network-operator state: present - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" ''' RETURN = ''' diff --git a/network/nxos/nxos_snmp_contact.py b/network/nxos/nxos_snmp_contact.py index aaaeab4f..e2d98733 100644 --- a/network/nxos/nxos_snmp_contact.py +++ b/network/nxos/nxos_snmp_contact.py @@ -47,9 +47,9 @@ EXAMPLES = ''' - nxos_snmp_contact: contact: Test state: present - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" ''' RETURN = ''' diff --git a/network/nxos/nxos_snmp_host.py b/network/nxos/nxos_snmp_host.py index 92f050fe..8717bb7e 100644 --- a/network/nxos/nxos_snmp_host.py +++ b/network/nxos/nxos_snmp_host.py @@ -87,9 +87,9 @@ EXAMPLES = ''' snmp_host: 3.3.3.3 community: TESTING state: present - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" ''' RETURN = ''' diff --git a/network/nxos/nxos_snmp_location.py b/network/nxos/nxos_snmp_location.py index 29d5cf57..25acf514 100644 --- a/network/nxos/nxos_snmp_location.py +++ b/network/nxos/nxos_snmp_location.py @@ -46,17 +46,17 @@ EXAMPLES = ''' - nxos_snmp_location: location: Test state: present - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" # ensure snmp location is not configured - nxos_snmp_location: location: Test state: absent - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" ''' RETURN = ''' diff --git a/network/nxos/nxos_snmp_traps.py b/network/nxos/nxos_snmp_traps.py index 63f1a3e3..a615c492 100644 --- a/network/nxos/nxos_snmp_traps.py +++ b/network/nxos/nxos_snmp_traps.py @@ -54,17 +54,17 @@ EXAMPLES = ''' - nxos_snmp_traps: group: lldp state: enabled - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" # ensure lldp trap is not configured - nxos_snmp_traps: group: lldp state: disabled - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" ''' RETURN = ''' diff --git a/network/nxos/nxos_snmp_user.py b/network/nxos/nxos_snmp_user.py index d3add9b7..56d515a8 100644 --- a/network/nxos/nxos_snmp_user.py +++ b/network/nxos/nxos_snmp_user.py @@ -73,9 +73,9 @@ EXAMPLES = ''' group: network-operator auth: md5 pwd: test_password - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" ''' RETURN = ''' diff --git a/network/nxos/nxos_udld.py b/network/nxos/nxos_udld.py index db53461f..7f8cedec 100644 --- a/network/nxos/nxos_udld.py +++ b/network/nxos/nxos_udld.py @@ -62,17 +62,17 @@ EXAMPLES = ''' - nxos_udld: aggressive: disabled msg_time: 20 - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" # Ensure agg mode is globally enabled and msg time is 15 - nxos_udld: aggressive: enabled msg_time: 15 - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" ''' RETURN = ''' diff --git a/network/nxos/nxos_udld_interface.py b/network/nxos/nxos_udld_interface.py index e061dde4..66473495 100644 --- a/network/nxos/nxos_udld_interface.py +++ b/network/nxos/nxos_udld_interface.py @@ -51,26 +51,26 @@ EXAMPLES = ''' interface: Ethernet1/1 mode: aggressive state: present - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" # Remove the aggressive config only if it's currently in aggressive mode and then disable udld (switch default) - nxos_udld_interface: interface: Ethernet1/1 mode: aggressive state: absent - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" # ensure Ethernet1/1 has aggressive mode enabled - nxos_udld_interface: interface: Ethernet1/1 mode: enabled - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" ''' RETURN = ''' diff --git a/network/nxos/nxos_vtp_domain.py b/network/nxos/nxos_vtp_domain.py index 54704913..93f62318 100644 --- a/network/nxos/nxos_vtp_domain.py +++ b/network/nxos/nxos_vtp_domain.py @@ -45,9 +45,9 @@ EXAMPLES = ''' # ENSURE VTP DOMAIN IS CONFIGURED - nxos_vtp_domain: domain: ntc - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" ''' diff --git a/network/nxos/nxos_vtp_password.py b/network/nxos/nxos_vtp_password.py index fee217a8..aa3cb13d 100644 --- a/network/nxos/nxos_vtp_password.py +++ b/network/nxos/nxos_vtp_password.py @@ -56,17 +56,17 @@ EXAMPLES = ''' - nxos_vtp_password: password: ntc state: present - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" # ENSURE VTP PASSWORD IS REMOVED - nxos_vtp_password: password: ntc state: absent - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" ''' RETURN = ''' diff --git a/network/nxos/nxos_vtp_version.py b/network/nxos/nxos_vtp_version.py index 90fad190..5ce455d8 100644 --- a/network/nxos/nxos_vtp_version.py +++ b/network/nxos/nxos_vtp_version.py @@ -43,9 +43,9 @@ EXAMPLES = ''' # ENSURE VTP VERSION IS 2 - nxos_vtp_version: version: 2 - host: {{ inventory_hostname }} - username: {{ un }} - password: {{ pwd }} + host: "{{ inventory_hostname }}" + username: "{{ un }}" + password: "{{ pwd }}" ''' RETURN = ''' diff --git a/network/sros/sros_config.py b/network/sros/sros_config.py index f1fd84a8..27c62fd5 100644 --- a/network/sros/sros_config.py +++ b/network/sros/sros_config.py @@ -186,7 +186,7 @@ vars: - name: load config from file sros_config: - src: {{ inventory_hostname }}.cfg + src: "{{ inventory_hostname }}.cfg" provider: "{{ cli }}" save: yes """ -- cgit v1.2.1