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:
Matt Clay 2018-01-16 15:08:56 -08:00 committed by GitHub
commit 227ff61f9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 533 additions and 344 deletions

View file

@ -199,7 +199,7 @@ EXAMPLES = '''
# Create multiple instances by specifying multiple names, separated by
# commas in the instance_names field
# (e.g. my-test-instance1,my-test-instance2)
gce:
- gce:
instance_names: my-test-instance1
zone: us-central1-a
machine_type: n1-standard-1
@ -213,7 +213,7 @@ EXAMPLES = '''
# Create a single instance of an image from the "my-base-image" image family
# in the us-central1-a Zone of the n1-standard-1 machine type.
# This image family is in the "my-other-project" GCP project.
gce:
- gce:
instance_names: my-test-instance1
zone: us-central1-a
machine_type: n1-standard-1
@ -229,7 +229,7 @@ EXAMPLES = '''
# Create a single Debian 8 instance in the us-central1-a Zone
# Use existing disks, custom network/subnetwork, set service account permissions
# add tags and metadata.
gce:
- gce:
instance_names: my-test-instance
zone: us-central1-a
machine_type: n1-standard-1

View file

@ -42,22 +42,22 @@ options:
EXAMPLES = '''
# Create a Global external IP address
gce_eip:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"
name: my-global-ip
region: global
state: present
- gce_eip:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"
name: my-global-ip
region: global
state: present
# Create a Regional external IP address
gce_eip:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"
name: my-global-ip
region: us-east1
state: present
- gce_eip:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"
name: my-global-ip
region: us-east1
state: present
'''
RETURN = '''

View file

@ -45,20 +45,20 @@ options:
EXAMPLES = '''
## List all Topics in a project
gcpubsub_facts:
view: topics
state: list
- gcpubsub_facts:
view: topics
state: list
## List all Subscriptions in a project
gcpubsub_facts:
view: subscriptions
state: list
- gcpubsub_facts:
view: subscriptions
state: list
## List all Subscriptions for a Topic in a project
gcpubsub_facts:
view: subscriptions
topic: my-topic
state: list
- gcpubsub_facts:
view: subscriptions
topic: my-topic
state: list
'''
RETURN = '''