Documentation

glance_image - Add/Delete images from glance

DEPRECATED

Deprecated in 1.10. Use os_image instead.

Synopsis

  • Add or Remove images from the glance repository.

Requirements (on host that executes module)

  • python >= 2.6
  • python-glanceclient
  • python-keystoneclient

Options

parameter required default choices comments
auth_url
no http://127.0.0.1:35357/v2.0/
The keystone url for authentication
container_format
no bare
The format of the container
copy_from
no None
A url from where the image can be downloaded, mutually exclusive with file parameter
disk_format
no qcow2
The format of the disk that is getting uploaded
endpoint_type
(added in 1.7)
no publicURL
  • publicURL
  • internalURL
The name of the glance service's endpoint URL type
file
no None
The path to the file which has to be uploaded, mutually exclusive with copy_from
is_public
no yes
Whether the image can be accessed publicly
login_password
yes yes
Password of login user
login_tenant_name
yes yes
The tenant name of the login user
login_username
yes admin
login username to authenticate to keystone
min_disk
no None
The minimum disk space required to deploy this image
min_ram
no None
The minimum ram required to deploy this image
name
yes None
Name that has to be given to the image
owner
no None
The owner of the image
region_name
no None
Name of the region
state
no present
  • present
  • absent
Indicate desired state of the resource
timeout
no 180
The time to wait for the image process to complete in seconds

Examples

- name: Upload an image from an HTTP URL
  glance_image:
    login_username: admin
    login_password: passme
    login_tenant_name: admin
    name: cirros
    container_format: bare
    disk_format: qcow2
    state: present
    copy_from: http://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.