community.general.imgadm (0.1.4) — module

Manage SmartOS images

Authors: Jasper Lievisse Adriaanse (@jasperla)

Install collection

Install with ansible-galaxy collection install community.general:==0.1.4


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.4

Description

Manage SmartOS virtual machine images through imgadm(1M)


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Import an image
  imgadm:
    uuid: '70e3ae72-96b6-11e6-9056-9737fd4d0764'
    state: imported
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete an image
  imgadm:
    uuid: '70e3ae72-96b6-11e6-9056-9737fd4d0764'
    state: deleted
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update all images
  imgadm:
    uuid: '*'
    state: updated
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update a single image
  imgadm:
    uuid: '70e3ae72-96b6-11e6-9056-9737fd4d0764'
    state: updated
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add a source
  imgadm:
    source: 'https://datasets.project-fifo.net'
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add a Docker source
  imgadm:
    source: 'https://docker.io'
    type: docker
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove a source
  imgadm:
    source: 'https://docker.io'
    state: absent

Inputs

    
pool:
    default: zones
    description:
    - zpool to import to or delete images from.
    required: false

type:
    choices:
    - imgapi
    - docker
    - dsapi
    default: imgapi
    description:
    - Type for image sources.
    required: false

uuid:
    description:
    - Image UUID. Can either be a full UUID or C(*) for all images.
    required: false

force:
    description:
    - Force a given operation (where supported by imgadm(1M)).
    required: false
    type: bool

state:
    choices:
    - present
    - absent
    - deleted
    - imported
    - updated
    - vacuumed
    description:
    - State the object operated on should be in. C(imported) is an alias for for C(present)
      and C(deleted) for C(absent). When set to C(vacuumed) and C(uuid) to C(*), it will
      remove all unused images.
    required: true

source:
    description:
    - URI for the image source.
    required: false

Outputs

source:
  description: Source that is managed.
  returned: When not managing an image.
  sample: https://datasets.project-fifo.net
  type: str
state:
  description: State of the target, after execution.
  returned: success
  sample: present
  type: str
uuid:
  description: UUID for an image operated on.
  returned: When not managing an image source.
  sample: 70e3ae72-96b6-11e6-9056-9737fd4d0764
  type: str