community.general.imgadm module – Manage SmartOS images
Note
This module is part of the community.general collection (version 5.8.3).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.imgadm
.
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 |
Comments |
---|---|
Force a given operation (where supported by imgadm(1M)). Choices:
|
|
zpool to import to or delete images from. Default: |
|
URI for the image source. |
|
State the object operated on should be in. Choices:
|
|
Type for image sources. Choices:
|
|
Image UUID. Can either be a full UUID or |
Examples
- name: Import an image
community.general.imgadm:
uuid: '70e3ae72-96b6-11e6-9056-9737fd4d0764'
state: imported
- name: Delete an image
community.general.imgadm:
uuid: '70e3ae72-96b6-11e6-9056-9737fd4d0764'
state: deleted
- name: Update all images
community.general.imgadm:
uuid: '*'
state: updated
- name: Update a single image
community.general.imgadm:
uuid: '70e3ae72-96b6-11e6-9056-9737fd4d0764'
state: updated
- name: Add a source
community.general.imgadm:
source: 'https://datasets.project-fifo.net'
state: present
- name: Add a Docker source
community.general.imgadm:
source: 'https://docker.io'
type: docker
state: present
- name: Remove a source
community.general.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 |
Description |
---|---|
Source that is managed. Returned: When not managing an image. Sample: |
|
State of the target, after execution. Returned: success Sample: |
|
UUID for an image operated on. Returned: When not managing an image source. Sample: |
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication