ansible / ansible.builtin / v2.5.6 / module / gce_img utilize GCE image resources | "added in version" 1.9 of ansible.builtin" Authors: Tom Melendez (supertom) preview | supported by communityansible.builtin.gce_img (v2.5.6) — module
pip
Install with pip install ansible==2.5.6
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)
# Create an image named test-image from the disk 'test-disk' in zone us-central1-a. - gce_img: name: test-image source: test-disk zone: us-central1-a state: present
# Create an image named test-image from a tarball in Google Cloud Storage. - gce_img: name: test-image source: https://storage.googleapis.com/bucket/path/to/image.tgz
# Alternatively use the gs scheme - gce_img: name: test-image source: gs://bucket/path/to/image.tgz
# Delete an image named test-image. - gce_img: name: test-image state: absent
name: default: null description: - the name of the image to create or delete required: true zone: default: us-central1-a description: - the zone of the disk specified by source required: false state: choices: - present - absent default: present description: - desired state of the image required: false family: default: null description: - an optional family name required: false version_added: '2.2' version_added_collection: ansible.builtin source: default: null description: - the source disk or the Google Cloud Storage URI to create the image from required: false timeout: default: 180 description: - timeout for the operation required: false version_added: '2.0' version_added_collection: ansible.builtin pem_file: default: null description: - path to the pem file associated with the service account email required: false project_id: default: null description: - your GCE project ID required: false description: default: null description: - an optional description required: false service_account_email: default: null description: - service account email required: false