mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-04 07:30:20 -07:00
doc: network: fix syntax errors in examples (#5780)
This commit is contained in:
parent
3f81a65e53
commit
507559dba5
21 changed files with 98 additions and 98 deletions
|
@ -148,7 +148,7 @@ vars:
|
||||||
- name: Enable eAPI access with default configuration
|
- name: Enable eAPI access with default configuration
|
||||||
eos_eapi:
|
eos_eapi:
|
||||||
state: started
|
state: started
|
||||||
provider: {{ cli }}
|
provider: "{{ cli }}"
|
||||||
|
|
||||||
- name: Enable eAPI with no HTTP, HTTPS at port 9443, local HTTP at port 80, and socket enabled
|
- name: Enable eAPI with no HTTP, HTTPS at port 9443, local HTTP at port 80, and socket enabled
|
||||||
eos_eapi:
|
eos_eapi:
|
||||||
|
@ -158,12 +158,12 @@ vars:
|
||||||
local_http: yes
|
local_http: yes
|
||||||
local_http_port: 80
|
local_http_port: 80
|
||||||
socket: yes
|
socket: yes
|
||||||
provider: {{ cli }}
|
provider: "{{ cli }}"
|
||||||
|
|
||||||
- name: Shutdown eAPI access
|
- name: Shutdown eAPI access
|
||||||
eos_eapi:
|
eos_eapi:
|
||||||
state: stopped
|
state: stopped
|
||||||
provider: {{ cli }}
|
provider: "{{ cli }}"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
RETURN = """
|
RETURN = """
|
||||||
|
|
|
@ -88,9 +88,9 @@ EXAMPLES = '''
|
||||||
address: 1.2.3.4
|
address: 1.2.3.4
|
||||||
acct_port: 2084
|
acct_port: 2084
|
||||||
host_timeout: 10
|
host_timeout: 10
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
|
|
||||||
# Radius Server Host Key Configuration
|
# Radius Server Host Key Configuration
|
||||||
- name: "Radius Server Host Key Configuration"
|
- name: "Radius Server Host Key Configuration"
|
||||||
|
@ -101,8 +101,8 @@ EXAMPLES = '''
|
||||||
key: hello
|
key: hello
|
||||||
encrypt_type: 7
|
encrypt_type: 7
|
||||||
host: inventory_hostname }}
|
host: inventory_hostname }}
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
|
|
||||||
# TACACS Server Host Configuration
|
# TACACS Server Host Configuration
|
||||||
- name: "Tacacs Server Host Configuration"
|
- name: "Tacacs Server Host Configuration"
|
||||||
|
|
|
@ -86,8 +86,8 @@ EXAMPLES = '''
|
||||||
report_supp: true
|
report_supp: true
|
||||||
v3_report_supp: true
|
v3_report_supp: true
|
||||||
host: "{{ inventory_hostname }}"
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -57,33 +57,33 @@ EXAMPLES = '''
|
||||||
# Ensure system mtu is 9126
|
# Ensure system mtu is 9126
|
||||||
- nxos_mtu:
|
- nxos_mtu:
|
||||||
sysmtu: 9216
|
sysmtu: 9216
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
|
|
||||||
# Config mtu on Eth1/1 (routed interface)
|
# Config mtu on Eth1/1 (routed interface)
|
||||||
- nxos_mtu:
|
- nxos_mtu:
|
||||||
interface: Ethernet1/1
|
interface: Ethernet1/1
|
||||||
mtu: 1600
|
mtu: 1600
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
|
|
||||||
# Config mtu on Eth1/3 (switched interface)
|
# Config mtu on Eth1/3 (switched interface)
|
||||||
- nxos_mtu:
|
- nxos_mtu:
|
||||||
interface: Ethernet1/3
|
interface: Ethernet1/3
|
||||||
mtu: 9216
|
mtu: 9216
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
|
|
||||||
# Unconfigure mtu on a given interface
|
# Unconfigure mtu on a given interface
|
||||||
- nxos_mtu:
|
- nxos_mtu:
|
||||||
interface: Ethernet1/3
|
interface: Ethernet1/3
|
||||||
mtu: 9216
|
mtu: 9216
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
state: absent
|
state: absent
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
|
@ -81,9 +81,9 @@ EXAMPLES = '''
|
||||||
server: 1.2.3.4
|
server: 1.2.3.4
|
||||||
key_id: 32
|
key_id: 32
|
||||||
prefer: enabled
|
prefer: enabled
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -77,9 +77,9 @@ EXAMPLES = '''
|
||||||
key_id: 32
|
key_id: 32
|
||||||
md5string: hello
|
md5string: hello
|
||||||
auth_type: text
|
auth_type: text
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -65,9 +65,9 @@ EXAMPLES = '''
|
||||||
master: true
|
master: true
|
||||||
stratum: 12
|
stratum: 12
|
||||||
logging: false
|
logging: false
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -112,7 +112,7 @@ vars:
|
||||||
|
|
||||||
- name: Enable NXAPI access with default configuration
|
- name: Enable NXAPI access with default configuration
|
||||||
nxos_nxapi:
|
nxos_nxapi:
|
||||||
provider: {{ cli }}
|
provider: "{{ cli }}"
|
||||||
|
|
||||||
- name: Enable NXAPI with no HTTP, HTTPS at port 9443 and sandbox disabled
|
- name: Enable NXAPI with no HTTP, HTTPS at port 9443 and sandbox disabled
|
||||||
nxos_nxapi:
|
nxos_nxapi:
|
||||||
|
@ -120,12 +120,12 @@ vars:
|
||||||
https_port: 9443
|
https_port: 9443
|
||||||
https: yes
|
https: yes
|
||||||
enable_sandbox: no
|
enable_sandbox: no
|
||||||
provider: {{ cli }}
|
provider: "{{ cli }}"
|
||||||
|
|
||||||
- name: remove NXAPI configuration
|
- name: remove NXAPI configuration
|
||||||
nxos_nxapi:
|
nxos_nxapi:
|
||||||
state: absent
|
state: absent
|
||||||
provider: {{ cli }}
|
provider: "{{ cli }}"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
RETURN = """
|
RETURN = """
|
||||||
|
|
|
@ -110,9 +110,9 @@ EXAMPLES = '''
|
||||||
- nxos_pim_interface:
|
- nxos_pim_interface:
|
||||||
interface: eth1/33
|
interface: eth1/33
|
||||||
state: absent
|
state: absent
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
|
|
||||||
# ensure the interface has pim-sm enabled with the appropriate priority and hello interval
|
# ensure the interface has pim-sm enabled with the appropriate priority and hello interval
|
||||||
- nxos_pim_interface:
|
- nxos_pim_interface:
|
||||||
|
@ -120,9 +120,9 @@ EXAMPLES = '''
|
||||||
dr_prio: 10
|
dr_prio: 10
|
||||||
hello_interval: 40
|
hello_interval: 40
|
||||||
state: present
|
state: present
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
|
|
||||||
# ensure join-prune policies exist
|
# ensure join-prune policies exist
|
||||||
- nxos_pim_interface:
|
- nxos_pim_interface:
|
||||||
|
@ -131,17 +131,17 @@ EXAMPLES = '''
|
||||||
jp_policy_out: JPOUT
|
jp_policy_out: JPOUT
|
||||||
jp_type_in: routemap
|
jp_type_in: routemap
|
||||||
jp_type_out: routemap
|
jp_type_out: routemap
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
|
|
||||||
# ensure defaults are in place
|
# ensure defaults are in place
|
||||||
- nxos_pim_interface:
|
- nxos_pim_interface:
|
||||||
interface: eth1/33
|
interface: eth1/33
|
||||||
state: default
|
state: default
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -62,9 +62,9 @@ EXAMPLES = '''
|
||||||
community: TESTING7
|
community: TESTING7
|
||||||
group: network-operator
|
group: network-operator
|
||||||
state: present
|
state: present
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -47,9 +47,9 @@ EXAMPLES = '''
|
||||||
- nxos_snmp_contact:
|
- nxos_snmp_contact:
|
||||||
contact: Test
|
contact: Test
|
||||||
state: present
|
state: present
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -82,9 +82,9 @@ EXAMPLES = '''
|
||||||
snmp_host: 3.3.3.3
|
snmp_host: 3.3.3.3
|
||||||
community: TESTING
|
community: TESTING
|
||||||
state: present
|
state: present
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -44,17 +44,17 @@ EXAMPLES = '''
|
||||||
- nxos_snmp_location:
|
- nxos_snmp_location:
|
||||||
location: Test
|
location: Test
|
||||||
state: present
|
state: present
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
|
|
||||||
# ensure snmp location is not configured
|
# ensure snmp location is not configured
|
||||||
- nxos_snmp_location:
|
- nxos_snmp_location:
|
||||||
location: Test
|
location: Test
|
||||||
state: absent
|
state: absent
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -54,17 +54,17 @@ EXAMPLES = '''
|
||||||
- nxos_snmp_traps:
|
- nxos_snmp_traps:
|
||||||
group: lldp
|
group: lldp
|
||||||
state: enabled
|
state: enabled
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
|
|
||||||
# ensure lldp trap is not configured
|
# ensure lldp trap is not configured
|
||||||
- nxos_snmp_traps:
|
- nxos_snmp_traps:
|
||||||
group: lldp
|
group: lldp
|
||||||
state: disabled
|
state: disabled
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -73,9 +73,9 @@ EXAMPLES = '''
|
||||||
group: network-operator
|
group: network-operator
|
||||||
auth: md5
|
auth: md5
|
||||||
pwd: test_password
|
pwd: test_password
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -62,17 +62,17 @@ EXAMPLES = '''
|
||||||
- nxos_udld:
|
- nxos_udld:
|
||||||
aggressive: disabled
|
aggressive: disabled
|
||||||
msg_time: 20
|
msg_time: 20
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
|
|
||||||
# Ensure agg mode is globally enabled and msg time is 15
|
# Ensure agg mode is globally enabled and msg time is 15
|
||||||
- nxos_udld:
|
- nxos_udld:
|
||||||
aggressive: enabled
|
aggressive: enabled
|
||||||
msg_time: 15
|
msg_time: 15
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -51,26 +51,26 @@ EXAMPLES = '''
|
||||||
interface: Ethernet1/1
|
interface: Ethernet1/1
|
||||||
mode: aggressive
|
mode: aggressive
|
||||||
state: present
|
state: present
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
|
|
||||||
# Remove the aggressive config only if it's currently in aggressive mode and then disable udld (switch default)
|
# Remove the aggressive config only if it's currently in aggressive mode and then disable udld (switch default)
|
||||||
- nxos_udld_interface:
|
- nxos_udld_interface:
|
||||||
interface: Ethernet1/1
|
interface: Ethernet1/1
|
||||||
mode: aggressive
|
mode: aggressive
|
||||||
state: absent
|
state: absent
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
|
|
||||||
# ensure Ethernet1/1 has aggressive mode enabled
|
# ensure Ethernet1/1 has aggressive mode enabled
|
||||||
- nxos_udld_interface:
|
- nxos_udld_interface:
|
||||||
interface: Ethernet1/1
|
interface: Ethernet1/1
|
||||||
mode: enabled
|
mode: enabled
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -45,9 +45,9 @@ EXAMPLES = '''
|
||||||
# ENSURE VTP DOMAIN IS CONFIGURED
|
# ENSURE VTP DOMAIN IS CONFIGURED
|
||||||
- nxos_vtp_domain:
|
- nxos_vtp_domain:
|
||||||
domain: ntc
|
domain: ntc
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -56,17 +56,17 @@ EXAMPLES = '''
|
||||||
- nxos_vtp_password:
|
- nxos_vtp_password:
|
||||||
password: ntc
|
password: ntc
|
||||||
state: present
|
state: present
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
|
|
||||||
# ENSURE VTP PASSWORD IS REMOVED
|
# ENSURE VTP PASSWORD IS REMOVED
|
||||||
- nxos_vtp_password:
|
- nxos_vtp_password:
|
||||||
password: ntc
|
password: ntc
|
||||||
state: absent
|
state: absent
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -43,9 +43,9 @@ EXAMPLES = '''
|
||||||
# ENSURE VTP VERSION IS 2
|
# ENSURE VTP VERSION IS 2
|
||||||
- nxos_vtp_version:
|
- nxos_vtp_version:
|
||||||
version: 2
|
version: 2
|
||||||
host: {{ inventory_hostname }}
|
host: "{{ inventory_hostname }}"
|
||||||
username: {{ un }}
|
username: "{{ un }}"
|
||||||
password: {{ pwd }}
|
password: "{{ pwd }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|
|
@ -186,7 +186,7 @@ vars:
|
||||||
|
|
||||||
- name: load config from file
|
- name: load config from file
|
||||||
sros_config:
|
sros_config:
|
||||||
src: {{ inventory_hostname }}.cfg
|
src: "{{ inventory_hostname }}.cfg"
|
||||||
provider: "{{ cli }}"
|
provider: "{{ cli }}"
|
||||||
save: yes
|
save: yes
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue