containers.podman.podman_volume (1.12.1) — module

Manage Podman volumes

| "added in version" 1.1.0 of containers.podman"

Authors: Sagi Shnaidman (@sshnaidm)

Install collection

Install with ansible-galaxy collection install containers.podman:==1.12.1


Add to requirements.yml

  collections:
    - name: containers.podman
      version: 1.12.1

Description

Manage Podman volumes


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# What modules does for example
- podman_volume:
    state: present
    name: volume1
    label:
      key: value
      key2: value2
    options:
      - "device=/dev/loop1"
      - "type=ext4"

Inputs

    
name:
    description:
    - Name of volume.
    required: true
    type: str

debug:
    default: false
    description:
    - Return additional information which can be helpful for investigations.
    type: bool

label:
    description:
    - Add metadata to a pod volume (e.g., label com.example.key=value).
    required: false
    type: dict

state:
    choices:
    - present
    - absent
    default: present
    description:
    - State of volume, default 'present'
    type: str

driver:
    description:
    - Specify volume driver name (default local).
    required: false
    type: str

options:
    description:
    - Set driver specific options. For example 'device=tpmfs', 'type=tmpfs'. UID and GID
      idempotency is not supported due to changes in podman.
    elements: str
    required: false
    type: list

recreate:
    default: false
    description:
    - Recreate volume even if exists.
    type: bool

executable:
    default: podman
    description:
    - Path to C(podman) executable if it is not in the C($PATH) on the machine running
      C(podman)
    type: str

Outputs

volume:
  description: Volume inspection results if exists.
  returned: always
  sample:
    CreatedAt: '2020-06-05T16:38:55.277628769+03:00'
    Driver: local
    Labels:
      key.com: value
      key.org: value2
    Mountpoint: /home/user/.local/share/containers/storage/volumes/test/_data
    Name: test
    Options: {}
    Scope: local
  type: dict