Author: | Eric Johnson <erjohnso@google.com> |
---|
New in version 1.4.
This module can create and destroy unformatted GCE persistent disks https://developers.google.com/compute/docs/disks#persistentdisks. It also supports attaching and detaching disks from running instances. Full install/configuration instructions for the gce* modules can be found in the comments of ansible/test/gce_tests.py.
parameter | required | default | choices | comments |
---|---|---|---|---|
detach_only | no | no |
|
do not destroy the disk, merely detach it from an instance |
image | no | the source image to use for the disk (added in Ansible 1.7) | ||
instance_name | no | instance name if you wish to attach or detach the disk | ||
mode | no | READ_ONLY |
|
GCE mount mode of disk, READ_ONLY (default) or READ_WRITE |
name | yes | name of the disk | ||
pem_file | no | path to the pem file associated with the service account email (added in Ansible 1.6) | ||
project_id | no | your GCE project ID (added in Ansible 1.6) | ||
service_account_email | no | service account email (added in Ansible 1.6) | ||
size_gb | no | 10 | whole integer size of disk (in GB) to create, default is 10 GB | |
snapshot | no | the source snapshot to use for the disk (added in Ansible 1.7) | ||
state | no | present |
|
desired state of the persistent disk |
zone | no | us-central1-b | zone in which to create the disk |
Note
Requires libcloud