community.general.atomic_container (8.5.0) — module

Manage the containers on the atomic host platform

Authors: Giuseppe Scrivano (@giuseppe)

Install collection

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


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Manage the containers on the atomic host platform.

Allows to manage the lifecycle of a container on the atomic host platform.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

- name: Install the etcd system container
  community.general.atomic_container:
    name: etcd
    image: rhel/etcd
    backend: ostree
    state: latest
    mode: system
    values:
        - ETCD_NAME=etcd.server
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Uninstall the etcd system container
  community.general.atomic_container:
    name: etcd
    image: rhel/etcd
    backend: ostree
    state: absent
    mode: system

Inputs

    
mode:
    choices:
    - user
    - system
    description:
    - Define if it is an user or a system container.
    type: str

name:
    description:
    - Name of the container.
    required: true
    type: str

image:
    description:
    - The image to use to install the container.
    required: true
    type: str

state:
    choices:
    - absent
    - latest
    - present
    - rollback
    default: latest
    description:
    - State of the container.
    type: str

rootfs:
    description:
    - Define the rootfs of the image.
    type: str

values:
    default: []
    description:
    - Values for the installation of the container.
    - This option is permitted only with mode 'user' or 'system'.
    - The values specified here will be used at installation time as --set arguments for
      atomic install.
    elements: str
    type: list

backend:
    choices:
    - docker
    - ostree
    description:
    - Define the backend to use for the container.
    required: true
    type: str

Outputs

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