mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 13:50:22 -07:00
Add module support to yamllint sanity test. (#34964)
* Add module support to yamllint sanity test. * Fix duplicate keys in module RETURN docs. * Fix syntax in return_common docs fragment. * Fix duplicate keys in module EXAMPLES docs.
This commit is contained in:
parent
240024ea4a
commit
227ff61f9d
53 changed files with 533 additions and 344 deletions
|
@ -85,7 +85,7 @@ EXAMPLES = r'''
|
|||
description: Web Intranet EPG
|
||||
bd: prod_bd
|
||||
|
||||
aci_epg:
|
||||
- aci_epg:
|
||||
hostname: apic
|
||||
username: admin
|
||||
password: SomeSecretPassword
|
||||
|
|
|
@ -66,7 +66,6 @@ EXAMPLES = '''
|
|||
addr: 10.30.10.66
|
||||
type: V4
|
||||
ratio: 3
|
||||
api_version: 16.4
|
||||
- name: Patch GSLB Service to delete an existing member
|
||||
avi_gslbservice_patch_member:
|
||||
controller: "{{ controller }}"
|
||||
|
|
|
@ -96,8 +96,6 @@ EXAMPLES = """
|
|||
password: "{{ password }}"
|
||||
transport: cli
|
||||
|
||||
tasks:
|
||||
|
||||
tasks:
|
||||
- name: "Run display version on remote devices"
|
||||
ce_command:
|
||||
|
|
|
@ -166,7 +166,7 @@ end_state:
|
|||
type: dict
|
||||
sample: {"process_id": "1", "area": "0.0.0.100", "interface": "10GE1/0/30",
|
||||
"cost": "100", "dead_interval": "40", "hello_interval": "10",
|
||||
"process_id": "6", "silent_interface": "false", "auth_mode": "none"}
|
||||
"silent_interface": "false", "auth_mode": "none"}
|
||||
updates:
|
||||
description: commands sent to the device
|
||||
returned: always
|
||||
|
|
|
@ -158,7 +158,7 @@ end_state:
|
|||
returned: always
|
||||
type: dict
|
||||
sample: {"snmp local user": {"local_user_info": []},
|
||||
"snmp local user": {"local_user_info": [{"aclNumber": "2000", "engineID": "800007DB03389222111200",
|
||||
"snmp usm user": {"usm_user_info": [{"aclNumber": "2000", "engineID": "800007DB03389222111200",
|
||||
"groupName": "wdz_group", "userName": "wdz_snmp"}]}}
|
||||
updates:
|
||||
description: command sent to the device
|
||||
|
|
|
@ -87,7 +87,6 @@ Tasks : The following are examples of using the module cnos_conditional_command.
|
|||
condition: "{{ hostvars[inventory_hostname]['condition']}}"
|
||||
flag: leaf_switch2
|
||||
command: "spanning-tree mode enable"
|
||||
enablePassword: "anil"
|
||||
|
||||
'''
|
||||
RETURN = '''
|
||||
|
|
|
@ -58,17 +58,17 @@ options:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
name: Create IPv4 tunnel interface 'iptun0'
|
||||
dladm_iptun: name=iptun0 local_address=192.0.2.23 remote_address=203.0.113.10 state=present
|
||||
- name: Create IPv4 tunnel interface 'iptun0'
|
||||
dladm_iptun: name=iptun0 local_address=192.0.2.23 remote_address=203.0.113.10 state=present
|
||||
|
||||
name: Change IPv4 tunnel remote address
|
||||
dladm_iptun: name=iptun0 type=ipv4 local_address=192.0.2.23 remote_address=203.0.113.11
|
||||
- name: Change IPv4 tunnel remote address
|
||||
dladm_iptun: name=iptun0 type=ipv4 local_address=192.0.2.23 remote_address=203.0.113.11
|
||||
|
||||
name: Create IPv6 tunnel interface 'tun0'
|
||||
dladm_iptun: name=tun0 type=ipv6 local_address=192.0.2.23 remote_address=203.0.113.42
|
||||
- name: Create IPv6 tunnel interface 'tun0'
|
||||
dladm_iptun: name=tun0 type=ipv6 local_address=192.0.2.23 remote_address=203.0.113.42
|
||||
|
||||
name: Remove 'iptun0' tunnel interface
|
||||
dladm_iptun: name=iptun0 state=absent
|
||||
- name: Remove 'iptun0' tunnel interface
|
||||
dladm_iptun: name=iptun0 state=absent
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -52,14 +52,14 @@ options:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
name: Set 'maxbw' to 100M on e1000g1
|
||||
dladm_linkprop: name=e1000g1 property=maxbw value=100M state=present
|
||||
- name: Set 'maxbw' to 100M on e1000g1
|
||||
dladm_linkprop: name=e1000g1 property=maxbw value=100M state=present
|
||||
|
||||
name: Set 'mtu' to 9000 on e1000g1
|
||||
dladm_linkprop: name=e1000g1 property=mtu value=9000
|
||||
- name: Set 'mtu' to 9000 on e1000g1
|
||||
dladm_linkprop: name=e1000g1 property=mtu value=9000
|
||||
|
||||
name: Reset 'mtu' property on e1000g1
|
||||
dladm_linkprop: name=e1000g1 property=mtu state=reset
|
||||
- name: Reset 'mtu' property on e1000g1
|
||||
dladm_linkprop: name=e1000g1 property=mtu state=reset
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -51,11 +51,11 @@ options:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
name: Create 'vlan42' VLAN over 'bnx0' link
|
||||
dladm_vlan: name=vlan42 link=bnx0 vlan_id=42 state=present
|
||||
- name: Create 'vlan42' VLAN over 'bnx0' link
|
||||
dladm_vlan: name=vlan42 link=bnx0 vlan_id=42 state=present
|
||||
|
||||
name: Remove 'vlan1337' VLAN interface
|
||||
dladm_vlan: name=vlan1337 state=absent
|
||||
- name: Remove 'vlan1337' VLAN interface
|
||||
dladm_vlan: name=vlan1337 state=absent
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -59,17 +59,17 @@ options:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
name: Configure IP address 10.0.0.1 on e1000g0
|
||||
ipadm_addr: addr=10.0.0.1/32 addrobj=e1000g0/v4 state=present
|
||||
- name: Configure IP address 10.0.0.1 on e1000g0
|
||||
ipadm_addr: addr=10.0.0.1/32 addrobj=e1000g0/v4 state=present
|
||||
|
||||
name: Delete addrobj
|
||||
ipadm_addr: addrobj=e1000g0/v4 state=absent
|
||||
- name: Delete addrobj
|
||||
ipadm_addr: addrobj=e1000g0/v4 state=absent
|
||||
|
||||
name: Configure link-local IPv6 address
|
||||
ipadm_addr: addtype=addrconf addrobj=vnic0/v6
|
||||
- name: Configure link-local IPv6 address
|
||||
ipadm_addr: addtype=addrconf addrobj=vnic0/v6
|
||||
|
||||
name: Configure address via DHCP and wait 180 seconds for address obtaining
|
||||
ipadm_addr: addrobj=vnic0/dhcp addrtype=dhcp wait=180
|
||||
- name: Configure address via DHCP and wait 180 seconds for address obtaining
|
||||
ipadm_addr: addrobj=vnic0/dhcp addrtype=dhcp wait=180
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -51,11 +51,11 @@ options:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
name: Mark address on addrobj as deprecated
|
||||
ipadm_addrprop: property=deprecated value=on addrobj=e1000g0/v6
|
||||
- name: Mark address on addrobj as deprecated
|
||||
ipadm_addrprop: property=deprecated value=on addrobj=e1000g0/v6
|
||||
|
||||
name: Set network prefix length for addrobj
|
||||
ipadm_addrprop: addrobj=bge0/v4 name=prefixlen value=26
|
||||
- name: Set network prefix length for addrobj
|
||||
ipadm_addrprop: addrobj=bge0/v4 name=prefixlen value=26
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -55,17 +55,17 @@ options:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
name: Allow forwarding of IPv4 packets on network interface e1000g0
|
||||
ipadm_ifprop: protocol=ipv4 property=forwarding value=on interface=e1000g0
|
||||
- name: Allow forwarding of IPv4 packets on network interface e1000g0
|
||||
ipadm_ifprop: protocol=ipv4 property=forwarding value=on interface=e1000g0
|
||||
|
||||
name: Temporarily reset IPv4 forwarding property on network interface e1000g0
|
||||
ipadm_ifprop: protocol=ipv4 interface=e1000g0 temporary=true property=forwarding state=reset
|
||||
- name: Temporarily reset IPv4 forwarding property on network interface e1000g0
|
||||
ipadm_ifprop: protocol=ipv4 interface=e1000g0 temporary=true property=forwarding state=reset
|
||||
|
||||
name: Configure IPv6 metric on network interface e1000g0
|
||||
ipadm_ifprop: protocol=ipv6 nic=e1000g0 name=metric value=100
|
||||
- name: Configure IPv6 metric on network interface e1000g0
|
||||
ipadm_ifprop: protocol=ipv6 nic=e1000g0 name=metric value=100
|
||||
|
||||
name: Set IPv6 MTU on network interface bge0
|
||||
ipadm_ifprop: interface=bge0 name=mtu value=1280 protocol=ipv6
|
||||
- name: Set IPv6 MTU on network interface bge0
|
||||
ipadm_ifprop: interface=bge0 name=mtu value=1280 protocol=ipv6
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -51,10 +51,10 @@ options:
|
|||
|
||||
EXAMPLES = '''
|
||||
# Set TCP receive buffer size
|
||||
ipadm_prop: protocol=tcp property=recv_buf value=65536
|
||||
- ipadm_prop: protocol=tcp property=recv_buf value=65536
|
||||
|
||||
# Reset UDP send buffer size to the default value
|
||||
ipadm_prop: protocol=udp property=send_buf state=reset
|
||||
- ipadm_prop: protocol=udp property=send_buf state=reset
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -60,7 +60,6 @@ options:
|
|||
EXAMPLES = '''
|
||||
# ENSURE VTP PASSWORD IS SET
|
||||
- nxos_vtp_password:
|
||||
password: ntc
|
||||
state: present
|
||||
host: "{{ inventory_hostname }}"
|
||||
username: "{{ un }}"
|
||||
|
@ -68,7 +67,6 @@ EXAMPLES = '''
|
|||
|
||||
# ENSURE VTP PASSWORD IS REMOVED
|
||||
- nxos_vtp_password:
|
||||
password: ntc
|
||||
state: absent
|
||||
host: "{{ inventory_hostname }}"
|
||||
username: "{{ un }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue