ansible.builtin.atomic_image (v2.9.27) — module

Manage the container images on the atomic host platform

| "added in version" 2.2 of ansible.builtin"

Authors: Saravanan KR (@krsacme)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

Manage the container images on the atomic host platform.

Allows to execute the commands specified by the RUN label in the container image when present.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Execute the run command on rsyslog container image (atomic run rhel7/rsyslog)
  atomic_image:
    name: rhel7/rsyslog
    state: latest
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Pull busybox to the OSTree backend
  atomic_image:
    name: busybox
    state: latest
    backend: ostree

Inputs

    
name:
    description:
    - Name of the container image.
    required: true

state:
    choices:
    - absent
    - latest
    - present
    default: latest
    description:
    - The state of the container image.
    - The state C(latest) will ensure container image is upgraded to the latest version
      and forcefully restart container, if running.

backend:
    choices:
    - docker
    - ostree
    description:
    - Define the backend where the image is pulled.
    version_added: '2.4'
    version_added_collection: ansible.builtin

started:
    default: 'yes'
    description:
    - Start or Stop the container.
    type: bool

Outputs

msg:
  description: The command standard output
  returned: always
  sample:
  - u'Using default tag: latest ...'
  type: str