community.general.gce_img – utilize GCE image resources¶
Note
This plugin is part of the community.general collection (version 1.3.6).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.gce_img
.
Synopsis¶
This module can create and delete GCE private images from gzipped compressed tarball containing raw disk data or from existing detached disks in any zone. https://cloud.google.com/compute/docs/images
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.6
apache-libcloud
Parameters¶
Examples¶
- name: Create an image named test-image from the disk 'test-disk' in zone us-central1-a
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
community.general.gce_img:
name: test-image
source: https://storage.googleapis.com/bucket/path/to/image.tgz
- name: Alternatively use the gs scheme
community.general.gce_img:
name: test-image
source: gs://bucket/path/to/image.tgz
- name: Delete an image named test-image
community.general.gce_img:
name: test-image
state: absent
Authors¶
Tom Melendez (@supertom)