imgadm – Manage SmartOS images

New in version 2.3.

Synopsis

  • Manage SmartOS virtual machine images through imgadm(1M)

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 2.6

Parameters

Parameter Choices/Defaults Comments
force
boolean
    Choices:
  • no
  • yes
Force a given operation (where supported by imgadm(1M)).
pool
-
Default:
"zones"
zpool to import to or delete images from.
source
-
URI for the image source.
state
- / required
    Choices:
  • present
  • absent
  • deleted
  • imported
  • updated
  • vacuumed
State the object operated on should be in. imported is an alias for for present and deleted for absent. When set to vacuumed and uuid to *, it will remove all unused images.
type
-
    Choices:
  • imgapi ←
  • docker
  • dsapi
Type for image sources.
uuid
-
Image UUID. Can either be a full UUID or * for all images.

Examples

- name: Import an image
  imgadm:
    uuid: '70e3ae72-96b6-11e6-9056-9737fd4d0764'
    state: imported

- name: Delete an image
  imgadm:
    uuid: '70e3ae72-96b6-11e6-9056-9737fd4d0764'
    state: deleted

- name: Update all images
  imgadm:
    uuid: '*'
    state: updated

- name: Update a single image
  imgadm:
    uuid: '70e3ae72-96b6-11e6-9056-9737fd4d0764'
    state: updated

- name: Add a source
  imgadm:
    source: 'https://datasets.project-fifo.net'
    state: present

- name: Add a Docker source
  imgadm:
    source: 'https://docker.io'
    type: docker
    state: present

- name: Remove a source
  imgadm:
    source: 'https://docker.io'
    state: absent

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
source
string
When not managing an image.
Source that is managed.

Sample:
https://datasets.project-fifo.net
state
string
success
State of the target, after execution.

Sample:
present
uuid
string
When not managing an image source.
UUID for an image operated on.

Sample:
70e3ae72-96b6-11e6-9056-9737fd4d0764


Status

Authors

  • Jasper Lievisse Adriaanse (@jasperla)

Hint

If you notice any issues in this documentation you can edit this document to improve it.