New in version 1.4.
The below requirements are needed on the host that executes this module.
Parameter |
Choices/Defaults |
Comments |
---|---|---|
credentials_file
(added in 2.1.0) |
|
path to the JSON file associated with the service account email
|
delete_on_termination
(added in 2.3) |
|
If
yes , deletes the volume when instance is terminated |
detach_only
|
|
do not destroy the disk, merely detach it from an instance
|
disk_type
(added in 1.9) |
|
type of disk provisioned
|
image
(added in 1.7) |
|
the source image to use for the disk
|
instance_name
|
|
instance name if you wish to attach or detach the disk
|
mode
|
|
GCE mount mode of disk, READ_ONLY (default) or READ_WRITE
|
name
required |
|
name of the disk
|
pem_file
(added in 1.6) |
|
path to the pem file associated with the service account email This option is deprecated. Use 'credentials_file'.
|
project_id
(added in 1.6) |
|
your GCE project ID
|
service_account_email
(added in 1.6) |
|
service account email
|
size_gb
|
Default:
10
|
whole integer size of disk (in GB) to create, default is 10 GB
|
snapshot
(added in 1.7) |
|
the source snapshot to use for the disk
|
state
|
|
desired state of the persistent disk
|
zone
|
Default:
us-central1-b
|
zone in which to create the disk
|
# Simple attachment action to an existing instance
- local_action:
module: gce_pd
instance_name: notlocalhost
size_gb: 5
name: pd
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Hint
If you notice any issues in this documentation you can edit this document to improve it.