community / community.general / 1.3.14 / module / gce_img utilize GCE image resources Authors: Tom Melendez (@supertom)community.general.gce_img (1.3.14) — module
Install with ansible-galaxy collection install community.general:==1.3.14
collections: - name: community.general version: 1.3.14
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. U(https://cloud.google.com/compute/docs/images)
- 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
name: description: - the name of the image to create or delete required: true type: str zone: default: us-central1-a description: - the zone of the disk specified by source type: str state: choices: - present - absent default: present description: - desired state of the image type: str family: description: - an optional family name type: str source: description: - the source disk or the Google Cloud Storage URI to create the image from type: str timeout: default: 180 description: - timeout for the operation type: int pem_file: description: - path to the pem file associated with the service account email type: path project_id: description: - your GCE project ID type: str description: description: - an optional description type: str service_account_email: description: - service account email type: str