1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-07 20:47:16 +00:00

modules: fix examples to use FQCN (#644)

* modules: fix examples to use FQCN

* fix

* fix

* fix
This commit is contained in:
Andrew Klychkov 2020-07-13 22:50:31 +03:00 committed by GitHub
parent 8b92e0454d
commit 41cfdda6a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
533 changed files with 2130 additions and 2130 deletions

View file

@ -85,7 +85,7 @@ author:
EXAMPLES = '''
- name: Upload some content
gc_storage:
community.general.gc_storage:
bucket: mybucket
object: key.txt
src: /usr/local/myfile.txt
@ -93,49 +93,49 @@ EXAMPLES = '''
permission: public-read
- name: Upload some headers
gc_storage:
community.general.gc_storage:
bucket: mybucket
object: key.txt
src: /usr/local/myfile.txt
headers: '{"Content-Encoding": "gzip"}'
- name: Download some content
gc_storage:
community.general.gc_storage:
bucket: mybucket
object: key.txt
dest: /usr/local/myfile.txt
mode: get
- name: Download an object as a string to use else where in your playbook
gc_storage:
community.general.gc_storage:
bucket: mybucket
object: key.txt
mode: get_str
- name: Create an empty bucket
gc_storage:
community.general.gc_storage:
bucket: mybucket
mode: create
- name: Create a bucket with key as directory
gc_storage:
community.general.gc_storage:
bucket: mybucket
object: /my/directory/path
mode: create
- name: Delete a bucket and all contents
gc_storage:
community.general.gc_storage:
bucket: mybucket
mode: delete
- name: Create a bucket with versioning enabled
gc_storage:
community.general.gc_storage:
bucket: "mybucket"
versioning: yes
mode: create
- name: Create a bucket located in the eu
gc_storage:
community.general.gc_storage:
bucket: "mybucket"
region: "europe-west3"
mode: create

View file

@ -129,14 +129,14 @@ notes:
EXAMPLES = '''
- name: Create an A record
gcdns_record:
community.general.gcdns_record:
record: 'www1.example.com'
zone: 'example.com'
type: A
value: '1.2.3.4'
- name: Update an existing record
gcdns_record:
community.general.gcdns_record:
record: 'www1.example.com'
zone: 'example.com'
type: A
@ -144,7 +144,7 @@ EXAMPLES = '''
value: '5.6.7.8'
- name: Remove an A record
gcdns_record:
community.general.gcdns_record:
record: 'www1.example.com'
zone_id: 'example-com'
state: absent
@ -152,14 +152,14 @@ EXAMPLES = '''
value: '5.6.7.8'
- name: Create a CNAME record. Note the trailing dot of value
gcdns_record:
community.general.gcdns_record:
record: 'www.example.com'
zone_id: 'example-com'
type: CNAME
value: 'www.example.com.'
- name: Create an MX record with a custom TTL. Note the trailing dot of value
gcdns_record:
community.general.gcdns_record:
record: 'example.com'
zone: 'example.com'
type: MX
@ -167,7 +167,7 @@ EXAMPLES = '''
value: '10 mail.example.com.'
- name: Create multiple A records with the same name
gcdns_record:
community.general.gcdns_record:
record: 'api.example.com'
zone_id: 'example-com'
type: A
@ -178,7 +178,7 @@ EXAMPLES = '''
- '203.0.113.10'
- name: Change the value of an existing record with multiple record_data
gcdns_record:
community.general.gcdns_record:
record: 'api.example.com'
zone: 'example.com'
type: A
@ -190,7 +190,7 @@ EXAMPLES = '''
- '203.0.113.10'
- name: Safely remove a multi-line record
gcdns_record:
community.general.gcdns_record:
record: 'api.example.com'
zone_id: 'example-com'
state: absent
@ -202,7 +202,7 @@ EXAMPLES = '''
- '203.0.113.10'
- name: Unconditionally remove a record
gcdns_record:
community.general.gcdns_record:
record: 'api.example.com'
zone_id: 'example-com'
state: absent
@ -210,21 +210,21 @@ EXAMPLES = '''
type: A
- name: Create an AAAA record
gcdns_record:
community.general.gcdns_record:
record: 'www1.example.com'
zone: 'example.com'
type: AAAA
value: 'fd00:db8::1'
- name: Create a PTR record
gcdns_record:
community.general.gcdns_record:
record: '10.5.168.192.in-addr.arpa'
zone: '5.168.192.in-addr.arpa'
type: PTR
value: 'api.example.com.' # Note the trailing dot.
- name: Create an NS record
gcdns_record:
community.general.gcdns_record:
record: 'subdomain.example.com'
zone: 'example.com'
type: NS
@ -236,7 +236,7 @@ EXAMPLES = '''
- 'ns-cloud-d4.googledomains.com.'
- name: Create a TXT record
gcdns_record:
community.general.gcdns_record:
record: 'example.com'
zone_id: 'example-com'
type: TXT

View file

@ -69,15 +69,15 @@ notes:
EXAMPLES = '''
# Basic zone creation example.
- name: Create a basic zone with the minimum number of parameters.
gcdns_zone: zone=example.com
community.general.gcdns_zone: zone=example.com
# Zone removal example.
- name: Remove a zone.
gcdns_zone: zone=example.com state=absent
community.general.gcdns_zone: zone=example.com state=absent
# Zone creation with description
- name: Creating a zone with a description
gcdns_zone: zone=example.com description="This is an awesome zone"
community.general.gcdns_zone: zone=example.com description="This is an awesome zone"
'''
RETURN = '''

View file

@ -153,7 +153,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:
- community.general.gce:
instance_names: my-test-instance1
zone: us-central1-a
machine_type: n1-standard-1
@ -167,7 +167,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:
- community.general.gce:
instance_names: my-test-instance1
zone: us-central1-a
machine_type: n1-standard-1
@ -183,7 +183,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:
- community.general.gce:
instance_names: my-test-instance
zone: us-central1-a
machine_type: n1-standard-1
@ -223,7 +223,7 @@ EXAMPLES = '''
- name: Create multiple instances
# Basic provisioning example. Create multiple Debian 8 instances in the
# us-central1-a Zone of n1-standard-1 machine type.
gce:
community.general.gce:
instance_names: test1,test2,test3
zone: us-central1-a
machine_type: n1-standard-1
@ -262,7 +262,7 @@ EXAMPLES = '''
- name: Delete test-instances
# Basic termination of instance.
gce:
community.general.gce:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"
@ -354,7 +354,7 @@ def create_instances(module, gce, instance_names, number, lc_zone):
up from 'module'
module : AnsibleModule object
gce: authenticated GCE libcloud driver
community.general.gce: authenticated GCE libcloud driver
instance_names: python list of instance names to create
number: number of instances to create
lc_zone: GCEZone object
@ -550,7 +550,7 @@ def change_instance_state(module, gce, instance_names, number, zone, state):
change from started to stopped, or started to absent.
module: Ansible module object
gce: authenticated GCE connection object
community.general.gce: authenticated GCE connection object
instance_names: a list of instance names to terminate
zone: GCEZone object where the instances reside prior to termination
state: 'state' parameter passed into module as argument

View file

@ -37,7 +37,7 @@ options:
EXAMPLES = '''
- name: Create a Global external IP address
gce_eip:
community.general.gce_eip:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"
@ -46,7 +46,7 @@ EXAMPLES = '''
state: present
- name: Create a Regional external IP address
gce_eip:
community.general.gce_eip:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"

View file

@ -60,24 +60,24 @@ author: "Tom Melendez (@supertom)"
EXAMPLES = '''
- name: Create an image named test-image from the disk 'test-disk' in zone us-central1-a
gce_img:
community.general.gce_img:
name: test-image
source: test-disk
zone: us-central1-a
state: present
- name: Create an image named test-image from a tarball in Google Cloud Storage
gce_img:
community.general.gce_img:
name: test-image
source: https://storage.googleapis.com/bucket/path/to/image.tgz
- name: Alternatively use the gs scheme
gce_img:
community.general.gce_img:
name: test-image
source: gs://bucket/path/to/image.tgz
- name: Delete an image named test-image
gce_img:
community.general.gce_img:
name: test-image
state: absent
'''

View file

@ -148,7 +148,7 @@ author: "Gwenael Pellen (@GwenaelPellenArkeup) <gwenael.pellen@arkeup.com>"
EXAMPLES = '''
# Usage
- name: Create instance template named foo
gce_instance_template:
community.general.gce_instance_template:
name: foo
size: n1-standard-1
image_family: ubuntu-1604-lts
@ -166,7 +166,7 @@ EXAMPLES = '''
project_id: "your-project-name"
tasks:
- name: Create instance template
gce_instance_template:
community.general.gce_instance_template:
name: my-test-instance-template
size: n1-standard-1
image_family: ubuntu-1604-lts
@ -175,7 +175,7 @@ EXAMPLES = '''
credentials_file: "{{ credentials_file }}"
service_account_email: "{{ service_account_email }}"
- name: Delete instance template
gce_instance_template:
community.general.gce_instance_template:
name: my-test-instance-template
size: n1-standard-1
image_family: ubuntu-1604-lts
@ -193,7 +193,7 @@ EXAMPLES = '''
project_id: "your-project-name"
tasks:
- name: Create instance template
gce_instance_template:
community.general.gce_instance_template:
name: foo
size: n1-standard-1
state: present

View file

@ -56,7 +56,7 @@ options:
EXAMPLES = '''
- name: Add labels on an existing instance (using resource_url)
gce_labels:
community.general.gce_labels:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"
@ -67,7 +67,7 @@ EXAMPLES = '''
resource_url: https://www.googleapis.com/compute/beta/projects/myproject/zones/us-central1-f/instances/example-instance
state: present
- name: Add labels on an image (using resource params)
gce_labels:
community.general.gce_labels:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"
@ -80,7 +80,7 @@ EXAMPLES = '''
resource_name: my-custom-image
state: present
- name: Remove specified labels from the GCE instance
gce_labels:
community.general.gce_labels:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"

View file

@ -80,7 +80,7 @@ EXAMPLES = '''
gather_facts: False
tasks:
- name: Create MIG
gce_mig:
community.general.gce_mig:
name: ansible-mig-example
zone: us-central1-c
state: present
@ -97,7 +97,7 @@ EXAMPLES = '''
seconds: 30
- name: Recreate MIG Instances with Instance Template change.
gce_mig:
community.general.gce_mig:
name: ansible-mig-example
zone: us-central1-c
state: present
@ -109,14 +109,14 @@ EXAMPLES = '''
seconds: 30
- name: Resize MIG
gce_mig:
community.general.gce_mig:
name: ansible-mig-example
zone: us-central1-c
state: present
size: 3
- name: Update MIG with Autoscaler
gce_mig:
community.general.gce_mig:
name: ansible-mig-example
zone: us-central1-c
state: present
@ -140,7 +140,7 @@ EXAMPLES = '''
seconds: 30
- name: Delete MIG
gce_mig:
community.general.gce_mig:
name: ansible-mig-example
zone: us-central1-c
state: absent

View file

@ -96,7 +96,7 @@ author: "Eric Johnson (@erjohnso) <erjohnso@google.com>, Tom Melendez (@supertom
EXAMPLES = '''
# Create a 'legacy' Network
- name: Create Legacy Network
gce_net:
community.general.gce_net:
name: legacynet
ipv4_range: '10.24.17.0/24'
mode: legacy
@ -104,14 +104,14 @@ EXAMPLES = '''
# Create an 'auto' Network
- name: Create Auto Network
gce_net:
community.general.gce_net:
name: autonet
mode: auto
state: present
# Create a 'custom' Network
- name: Create Custom Network
gce_net:
community.general.gce_net:
name: customnet
mode: custom
subnet_name: "customsubnet"
@ -121,7 +121,7 @@ EXAMPLES = '''
# Create Firewall Rule with Source Tags
- name: Create Firewall Rule w/Source Tags
gce_net:
community.general.gce_net:
name: default
fwname: "my-firewall-rule"
allowed: tcp:80
@ -130,7 +130,7 @@ EXAMPLES = '''
# Create Firewall Rule with Source Range
- name: Create Firewall Rule w/Source Range
gce_net:
community.general.gce_net:
name: default
fwname: "my-firewall-rule"
allowed: tcp:80
@ -139,7 +139,7 @@ EXAMPLES = '''
# Create Custom Subnetwork
- name: Create Custom Subnetwork
gce_net:
community.general.gce_net:
name: privatenet
mode: custom
subnet_name: subnet_example

View file

@ -56,7 +56,7 @@ author: Rob Wagner (@robwagner33)
EXAMPLES = '''
- name: Create gce snapshot
gce_snapshot:
community.general.gce_snapshot:
instance_name: example-instance
snapshot_name: example-snapshot
state: present
@ -66,7 +66,7 @@ EXAMPLES = '''
delegate_to: localhost
- name: Delete gce snapshot
gce_snapshot:
community.general.gce_snapshot:
instance_name: example-instance
snapshot_name: example-snapshot
state: absent
@ -78,7 +78,7 @@ EXAMPLES = '''
# This example creates snapshots for only two of the available disks as
# disk0-example-snapshot and disk1-example-snapshot
- name: Create snapshots of specific disks
gce_snapshot:
community.general.gce_snapshot:
instance_name: example-instance
snapshot_name: example-snapshot
state: present

View file

@ -58,20 +58,20 @@ author:
EXAMPLES = '''
- name: Add tags to instance
gce_tag:
community.general.gce_tag:
instance_name: staging-server
tags: http-server,https-server,staging
zone: us-central1-a
state: present
- name: Remove tags from instance in default zone (us-central1-a)
gce_tag:
community.general.gce_tag:
instance_name: test-server
tags: foo,bar
state: absent
- name: Add tags to instances in zone that match pattern
gce_tag:
community.general.gce_tag:
instance_pattern: test-server-*
tags: foo,bar
zone: us-central1-a

View file

@ -45,7 +45,7 @@ options:
EXAMPLES = '''
- name: Create Minimum HTTP Target_Proxy
gcp_target_proxy:
community.general.gcp_target_proxy:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"

View file

@ -70,7 +70,7 @@ options:
EXAMPLES = '''
- name: Create Minimal Url_Map
gcp_url_map:
community.general.gcp_url_map:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"
@ -78,7 +78,7 @@ EXAMPLES = '''
default_service: my-backend-service
state: present
- name: Create UrlMap with pathmatcher
gcp_url_map:
community.general.gcp_url_map:
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"

View file

@ -63,21 +63,21 @@ options:
EXAMPLES = '''
- name: Create instance
gcspanner:
community.general.gcspanner:
instance_id: '{{ instance_id }}'
configuration: '{{ configuration }}'
state: present
node_count: 1
- name: Create database
gcspanner:
community.general.gcspanner:
instance_id: '{{ instance_id }}'
configuration: '{{ configuration }}'
database_name: '{{ database_name }}'
state: present
- name: Delete instance (and all databases)
- gcspanner:
- community.general.gcspanner:
instance_id: '{{ instance_id }}'
configuration: '{{ configuration }}'
state: absent