Note
This plugin is part of the community.general collection.
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.gce_pd
.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
credentials_file string | path to the JSON file associated with the service account email | |
delete_on_termination boolean |
| If yes , deletes the volume when instance is terminated |
detach_only boolean |
| do not destroy the disk, merely detach it from an instance |
disk_type string |
| type of disk provisioned |
image string | the source image to use for the disk | |
instance_name string | instance name if you wish to attach or detach the disk | |
mode string |
| GCE mount mode of disk, READ_ONLY (default) or READ_WRITE |
name string / required | name of the disk | |
pem_file string | path to the pem file associated with the service account email This option is deprecated. Use 'credentials_file'. | |
project_id string | your GCE project ID | |
service_account_email string | service account email | |
size_gb string | Default: 10 | whole integer size of disk (in GB) to create, default is 10 GB |
snapshot string | the source snapshot to use for the disk | |
state string |
| desired state of the persistent disk |
zone string | Default: "us-central1-b" | zone in which to create the disk |
- name: Simple attachment action to an existing instance local_action: module: gce_pd instance_name: notlocalhost size_gb: 5 name: pd
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/general/gce_pd_module.html