mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -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
|
@ -104,43 +104,43 @@ extends_documentation_fragment: cloudstack
|
|||
|
||||
EXAMPLES = '''
|
||||
# create an account in domain 'CUSTOMERS'
|
||||
local_action:
|
||||
module: cs_account
|
||||
name: customer_xy
|
||||
username: customer_xy
|
||||
password: S3Cur3
|
||||
last_name: Doe
|
||||
first_name: John
|
||||
email: john.doe@example.com
|
||||
domain: CUSTOMERS
|
||||
- local_action:
|
||||
module: cs_account
|
||||
name: customer_xy
|
||||
username: customer_xy
|
||||
password: S3Cur3
|
||||
last_name: Doe
|
||||
first_name: John
|
||||
email: john.doe@example.com
|
||||
domain: CUSTOMERS
|
||||
|
||||
# Lock an existing account in domain 'CUSTOMERS'
|
||||
local_action:
|
||||
module: cs_account
|
||||
name: customer_xy
|
||||
domain: CUSTOMERS
|
||||
state: locked
|
||||
- local_action:
|
||||
module: cs_account
|
||||
name: customer_xy
|
||||
domain: CUSTOMERS
|
||||
state: locked
|
||||
|
||||
# Disable an existing account in domain 'CUSTOMERS'
|
||||
local_action:
|
||||
module: cs_account
|
||||
name: customer_xy
|
||||
domain: CUSTOMERS
|
||||
state: disabled
|
||||
- local_action:
|
||||
module: cs_account
|
||||
name: customer_xy
|
||||
domain: CUSTOMERS
|
||||
state: disabled
|
||||
|
||||
# Enable an existing account in domain 'CUSTOMERS'
|
||||
local_action:
|
||||
module: cs_account
|
||||
name: customer_xy
|
||||
domain: CUSTOMERS
|
||||
state: enabled
|
||||
- local_action:
|
||||
module: cs_account
|
||||
name: customer_xy
|
||||
domain: CUSTOMERS
|
||||
state: enabled
|
||||
|
||||
# Remove an account in domain 'CUSTOMERS'
|
||||
local_action:
|
||||
module: cs_account
|
||||
name: customer_xy
|
||||
domain: CUSTOMERS
|
||||
state: absent
|
||||
- local_action:
|
||||
module: cs_account
|
||||
name: customer_xy
|
||||
domain: CUSTOMERS
|
||||
state: absent
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -251,11 +251,6 @@ gateway_ipv6:
|
|||
returned: success
|
||||
type: string
|
||||
sample: 2001:db8::1
|
||||
state:
|
||||
description: State of the network.
|
||||
returned: success
|
||||
type: string
|
||||
sample: Implemented
|
||||
zone:
|
||||
description: Name of zone.
|
||||
returned: success
|
||||
|
|
|
@ -82,18 +82,18 @@ extends_documentation_fragment: cloudstack
|
|||
|
||||
EXAMPLES = '''
|
||||
# create a network ACL
|
||||
local_action:
|
||||
module: cs_network_acl
|
||||
name: Webserver ACL
|
||||
description: a more detailed description of the ACL
|
||||
vpc: customers
|
||||
- local_action:
|
||||
module: cs_network_acl
|
||||
name: Webserver ACL
|
||||
description: a more detailed description of the ACL
|
||||
vpc: customers
|
||||
|
||||
# remove a network ACL
|
||||
local_action:
|
||||
module: cs_network_acl
|
||||
name: Webserver ACL
|
||||
vpc: customers
|
||||
state: absent
|
||||
- local_action:
|
||||
module: cs_network_acl
|
||||
name: Webserver ACL
|
||||
vpc: customers
|
||||
state: absent
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -145,47 +145,47 @@ extends_documentation_fragment: cloudstack
|
|||
|
||||
EXAMPLES = '''
|
||||
# create a network ACL rule, allow port 80 ingress
|
||||
local_action:
|
||||
module: cs_network_acl_rule
|
||||
network_acl: web
|
||||
rule_position: 1
|
||||
vpc: my vpc
|
||||
traffic_type: ingress
|
||||
action_policy: allow
|
||||
port: 80
|
||||
cidr: 0.0.0.0/0
|
||||
- local_action:
|
||||
module: cs_network_acl_rule
|
||||
network_acl: web
|
||||
rule_position: 1
|
||||
vpc: my vpc
|
||||
traffic_type: ingress
|
||||
action_policy: allow
|
||||
port: 80
|
||||
cidr: 0.0.0.0/0
|
||||
|
||||
# create a network ACL rule, deny port range 8000-9000 ingress for 10.20.0.0/16
|
||||
local_action:
|
||||
module: cs_network_acl_rule
|
||||
network_acl: web
|
||||
rule_position: 1
|
||||
vpc: my vpc
|
||||
traffic_type: ingress
|
||||
action_policy: deny
|
||||
start_port: 8000
|
||||
end_port: 8000
|
||||
cidr: 10.20.0.0/16
|
||||
- local_action:
|
||||
module: cs_network_acl_rule
|
||||
network_acl: web
|
||||
rule_position: 1
|
||||
vpc: my vpc
|
||||
traffic_type: ingress
|
||||
action_policy: deny
|
||||
start_port: 8000
|
||||
end_port: 8000
|
||||
cidr: 10.20.0.0/16
|
||||
|
||||
# create a network ACL rule
|
||||
local_action:
|
||||
module: cs_network_acl_rule
|
||||
network_acl: web
|
||||
rule_position: 1
|
||||
vpc: my vpc
|
||||
traffic_type: ingress
|
||||
action_policy: deny
|
||||
start_port: 8000
|
||||
end_port: 8000
|
||||
cidr: 10.20.0.0/16
|
||||
- local_action:
|
||||
module: cs_network_acl_rule
|
||||
network_acl: web
|
||||
rule_position: 1
|
||||
vpc: my vpc
|
||||
traffic_type: ingress
|
||||
action_policy: deny
|
||||
start_port: 8000
|
||||
end_port: 8000
|
||||
cidr: 10.20.0.0/16
|
||||
|
||||
# remove a network ACL rule
|
||||
local_action:
|
||||
module: cs_network_acl_rule
|
||||
network_acl: web
|
||||
rule_position: 1
|
||||
vpc: my vpc
|
||||
state: absent
|
||||
- local_action:
|
||||
module: cs_network_acl_rule
|
||||
network_acl: web
|
||||
rule_position: 1
|
||||
vpc: my vpc
|
||||
state: absent
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -60,17 +60,17 @@ extends_documentation_fragment: cloudstack
|
|||
|
||||
EXAMPLES = '''
|
||||
# create a region
|
||||
local_action:
|
||||
module: cs_region
|
||||
id: 2
|
||||
name: geneva
|
||||
endpoint: https://cloud.gva.example.com
|
||||
- local_action:
|
||||
module: cs_region
|
||||
id: 2
|
||||
name: geneva
|
||||
endpoint: https://cloud.gva.example.com
|
||||
|
||||
# remove a region with ID 2
|
||||
local_action:
|
||||
module: cs_region
|
||||
id: 2
|
||||
state: absent
|
||||
- local_action:
|
||||
module: cs_region
|
||||
id: 2
|
||||
state: absent
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -76,19 +76,19 @@ extends_documentation_fragment: cloudstack
|
|||
|
||||
EXAMPLES = '''
|
||||
# Update a resource limit for instances of a domain
|
||||
local_action:
|
||||
module: cs_resourcelimit
|
||||
type: instance
|
||||
limit: 10
|
||||
domain: customers
|
||||
- local_action:
|
||||
module: cs_resourcelimit
|
||||
type: instance
|
||||
limit: 10
|
||||
domain: customers
|
||||
|
||||
# Update a resource limit for instances of an account
|
||||
local_action:
|
||||
module: cs_resourcelimit
|
||||
type: instance
|
||||
limit: 12
|
||||
account: moserre
|
||||
domain: customers
|
||||
- local_action:
|
||||
module: cs_resourcelimit
|
||||
type: instance
|
||||
limit: 12
|
||||
account: moserre
|
||||
domain: customers
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -111,7 +111,6 @@ EXAMPLES = '''
|
|||
pod: pod01
|
||||
storage_url: rbd://admin:SECRET@ceph-the-mons.domain/poolname
|
||||
provider: DefaultPrimary
|
||||
name: Ceph RBD
|
||||
scope: cluster
|
||||
allocation_state: disabled
|
||||
|
||||
|
@ -124,7 +123,6 @@ EXAMPLES = '''
|
|||
pod: pod01
|
||||
storage_url: rbd://admin:SECRET@ceph-the-mons.domain/poolname
|
||||
provider: DefaultPrimary
|
||||
name: Ceph RBD
|
||||
scope: cluster
|
||||
allocation_state: maintenance
|
||||
|
||||
|
|
|
@ -101,43 +101,43 @@ extends_documentation_fragment: cloudstack
|
|||
|
||||
EXAMPLES = '''
|
||||
# create an user in domain 'CUSTOMERS'
|
||||
local_action:
|
||||
module: cs_user
|
||||
account: developers
|
||||
username: johndoe
|
||||
password: S3Cur3
|
||||
last_name: Doe
|
||||
first_name: John
|
||||
email: john.doe@example.com
|
||||
domain: CUSTOMERS
|
||||
- local_action:
|
||||
module: cs_user
|
||||
account: developers
|
||||
username: johndoe
|
||||
password: S3Cur3
|
||||
last_name: Doe
|
||||
first_name: John
|
||||
email: john.doe@example.com
|
||||
domain: CUSTOMERS
|
||||
|
||||
# Lock an existing user in domain 'CUSTOMERS'
|
||||
local_action:
|
||||
module: cs_user
|
||||
username: johndoe
|
||||
domain: CUSTOMERS
|
||||
state: locked
|
||||
- local_action:
|
||||
module: cs_user
|
||||
username: johndoe
|
||||
domain: CUSTOMERS
|
||||
state: locked
|
||||
|
||||
# Disable an existing user in domain 'CUSTOMERS'
|
||||
local_action:
|
||||
module: cs_user
|
||||
username: johndoe
|
||||
domain: CUSTOMERS
|
||||
state: disabled
|
||||
- local_action:
|
||||
module: cs_user
|
||||
username: johndoe
|
||||
domain: CUSTOMERS
|
||||
state: disabled
|
||||
|
||||
# Enable/unlock an existing user in domain 'CUSTOMERS'
|
||||
local_action:
|
||||
module: cs_user
|
||||
username: johndoe
|
||||
domain: CUSTOMERS
|
||||
state: enabled
|
||||
- local_action:
|
||||
module: cs_user
|
||||
username: johndoe
|
||||
domain: CUSTOMERS
|
||||
state: enabled
|
||||
|
||||
# Remove an user in domain 'CUSTOMERS'
|
||||
local_action:
|
||||
module: cs_user
|
||||
name: customer_xy
|
||||
domain: CUSTOMERS
|
||||
state: absent
|
||||
- local_action:
|
||||
module: cs_user
|
||||
name: customer_xy
|
||||
domain: CUSTOMERS
|
||||
state: absent
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue