Note
This plugin is part of the community.general collection (version 3.8.1).
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
.
To use it in a playbook, specify: community.general.imgadm
.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
force boolean |
| Force a given operation (where supported by imgadm(1M)). |
pool string | Default: "zones" | zpool to import to or delete images from. |
source string | URI for the image source. | |
state string / required |
| 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 string |
| Type for image sources. |
uuid string | Image UUID. Can either be a full UUID or * for all images. |
- 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
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 |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/imgadm_module.html