mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-08 02:01:31 -07:00
Bug fixes for GCP modules (#53879)
This commit is contained in:
parent
e8e69bf069
commit
b429ba61dc
33 changed files with 1093 additions and 1091 deletions
|
@ -123,11 +123,6 @@ options:
|
|||
- Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied
|
||||
encryption key to either encrypt or decrypt this resource.
|
||||
required: false
|
||||
sha256:
|
||||
description:
|
||||
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied
|
||||
encryption key that protects this resource.
|
||||
required: false
|
||||
index:
|
||||
description:
|
||||
- Assigns a zero-based index to this disk, where 0 is reserved for the
|
||||
|
@ -179,11 +174,6 @@ options:
|
|||
- Specifies a 256-bit customer-supplied encryption key, encoded
|
||||
in RFC 4648 base64 to either encrypt or decrypt this resource.
|
||||
required: false
|
||||
sha256:
|
||||
description:
|
||||
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied
|
||||
encryption key that protects this resource.
|
||||
required: false
|
||||
interface:
|
||||
description:
|
||||
- Specifies the disk interface to use for attaching this disk, which is
|
||||
|
@ -315,11 +305,6 @@ options:
|
|||
range. If left unspecified, the primary range of the subnetwork
|
||||
will be used.
|
||||
required: false
|
||||
name:
|
||||
description:
|
||||
- The name of the network interface, generated by the server. For network
|
||||
devices, these are eth0, eth1, etc .
|
||||
required: false
|
||||
network:
|
||||
description:
|
||||
- Specifies the title of an existing network. When creating an instance,
|
||||
|
@ -418,43 +403,43 @@ extends_documentation_fragment: gcp
|
|||
EXAMPLES = '''
|
||||
- name: create a network
|
||||
gcp_compute_network:
|
||||
name: "network-instancetemplate"
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
state: present
|
||||
name: network-instancetemplate
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
state: present
|
||||
register: network
|
||||
|
||||
- name: create a address
|
||||
gcp_compute_address:
|
||||
name: "address-instancetemplate"
|
||||
region: us-west1
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
state: present
|
||||
name: address-instancetemplate
|
||||
region: us-west1
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
state: present
|
||||
register: address
|
||||
|
||||
- name: create a instance template
|
||||
gcp_compute_instance_template:
|
||||
name: "test_object"
|
||||
properties:
|
||||
disks:
|
||||
- auto_delete: true
|
||||
boot: true
|
||||
initialize_params:
|
||||
source_image: projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts
|
||||
machine_type: n1-standard-1
|
||||
network_interfaces:
|
||||
- network: "{{ network }}"
|
||||
access_configs:
|
||||
- name: test-config
|
||||
type: ONE_TO_ONE_NAT
|
||||
nat_ip: "{{ address }}"
|
||||
project: "test_project"
|
||||
auth_kind: "serviceaccount"
|
||||
service_account_file: "/tmp/auth.pem"
|
||||
state: present
|
||||
name: test_object
|
||||
properties:
|
||||
disks:
|
||||
- auto_delete: 'true'
|
||||
boot: 'true'
|
||||
initialize_params:
|
||||
source_image: projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts
|
||||
machine_type: n1-standard-1
|
||||
network_interfaces:
|
||||
- network: "{{ network }}"
|
||||
access_configs:
|
||||
- name: test-config
|
||||
type: ONE_TO_ONE_NAT
|
||||
nat_ip: "{{ address }}"
|
||||
project: test_project
|
||||
auth_kind: serviceaccount
|
||||
service_account_file: "/tmp/auth.pem"
|
||||
state: present
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
@ -878,9 +863,7 @@ def main():
|
|||
auto_delete=dict(type='bool'),
|
||||
boot=dict(type='bool'),
|
||||
device_name=dict(type='str'),
|
||||
disk_encryption_key=dict(
|
||||
type='dict', options=dict(raw_key=dict(type='str'), rsa_encrypted_key=dict(type='str'), sha256=dict(type='str'))
|
||||
),
|
||||
disk_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'), rsa_encrypted_key=dict(type='str'))),
|
||||
index=dict(type='int'),
|
||||
initialize_params=dict(
|
||||
type='dict',
|
||||
|
@ -889,7 +872,7 @@ def main():
|
|||
disk_size_gb=dict(type='int'),
|
||||
disk_type=dict(type='str'),
|
||||
source_image=dict(type='str'),
|
||||
source_image_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'), sha256=dict(type='str'))),
|
||||
source_image_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'))),
|
||||
),
|
||||
),
|
||||
interface=dict(type='str', choices=['SCSI', 'NVME']),
|
||||
|
@ -916,7 +899,6 @@ def main():
|
|||
alias_ip_ranges=dict(
|
||||
type='list', elements='dict', options=dict(ip_cidr_range=dict(type='str'), subnetwork_range_name=dict(type='str'))
|
||||
),
|
||||
name=dict(type='str'),
|
||||
network=dict(),
|
||||
network_ip=dict(type='str'),
|
||||
subnetwork=dict(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue