Working with podman:

kaau@OCLT71159526 ~/myproj/NACBSRE_sre_client_app_86039$ cat podman01.yml
---
- hosts: localhost
  connection: local
  tasks:
    - name: Show podman version
      command: podman --version
      register: version
    - debug:
        var: version.stdout
    - name: Show podman info
      command: podman info
      register: info
      ignore_errors: true
    - debug:
        var: info.stderr_lines
    - name: Pull alpine
      command: podman pull docker.io/library/alpine:latest
      register: pull
      ignore_errors: true
    - debug:
        var: pull

#
# Ansible output:
#
ansible-playbook [core 2.15.13]
  config file = /runner/project/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.11/site-packages/ansible
  ansible collection location = /runner/requirements_collections:/root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible-playbook
  python version = 3.11.13 (main, Aug 21 2025, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-11)] (/usr/bin/python3.11)
  jinja version = 3.1.6
  libyaml = True
Using /runner/project/ansible.cfg as config file
SSH password: 
Vault password: 
host_list declined parsing /runner/inventory/hosts as it did not pass its verify_file() method
Parsed /runner/inventory/hosts inventory source with script plugin
Skipping callback 'awx_display', as we already have a stdout callback.
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: podman.yml ***********************************************************
1 plays in podman.yml

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
task path: /runner/project/podman.yml:2
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir 
"` echo /root/.ansible/tmp/ansible-tmp-1786557774.0735393-15-87692363582835 `" && echo ansible-tmp-1786557774.0735393-15-87692363582835="` 
echo /root/.ansible/tmp/ansible-tmp-1786557774.0735393-15-87692363582835 `" ) && sleep 0'
Using module file /usr/lib/python3.11/site-packages/ansible/modules/setup.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-10us_789uo/tmpvaktakd9 TO /root/.ansible/tmp/ansible-tmp-1786557774.0735393-15-87692363582835/
AnsiballZ_setup.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1786557774.0735393-15-87692363582835/ 
/root/.ansible/tmp/ansible-tmp-1786557774.0735393-15-87692363582835/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3.11 /root/.ansible/tmp/ansible-tmp-1786557774.0735393-15-87692363582835/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1786557774.0735393-15-87692363582835/ > /dev/null 2>&1 && sleep 0'
ok: [localhost]
TASK [Show podman version] *****************************************************
task path: /runner/project/podman.yml:5
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/
ansible-tmp-1786557775.0880172-73-69536780192699 `" && echo ansible-tmp-1786557775.0880172-73-69536780192699="` 
echo /root/.ansible/tmp/ansible-tmp-1786557775.0880172-73-69536780192699 `" ) && sleep 0'
Using module file /usr/lib/python3.11/site-packages/ansible/modules/command.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-10us_789uo/tmpiazow1ar TO /root/.ansible/tmp/ansible-tmp-1786557775.0880172-73-69536780192699/
AnsiballZ_command.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1786557775.0880172-73-69536780192699/ /root/.ansible/tmp/
ansible-tmp-1786557775.0880172-73-69536780192699/AnsiballZ_command.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3.11 /root/.ansible/tmp/ansible-tmp-1786557775.0880172-73-69536780192699/AnsiballZ_command.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1786557775.0880172-73-69536780192699/ > /dev/null 2>&1 && sleep 0'
changed: [localhost] => {
    "changed": true,
    "cmd": [
        "podman",
        "--version"
    ],
    "delta": "0:00:00.110965",
    "end": "2026-08-12 18:02:55.574766",
    "invocation": {
        "module_args": {
            "_raw_params": "podman --version",
            "_uses_shell": false,
            "argv": null,
            "chdir": null,
            "creates": null,
            "executable": null,
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true
        }
    },
    "msg": "",
    "rc": 0,
    "start": "2026-08-12 18:02:55.463801",
    "stderr": "",
    "stderr_lines": [],
    "stdout": "podman version 5.6.0",
    "stdout_lines": [
        "podman version 5.6.0"
    ]
}

TASK [debug] *******************************************************************
task path: /runner/project/podman.yml:8
ok: [localhost] => {
    "version.stdout": "podman version 5.6.0"
}
TASK [Show podman info] ********************************************************
task path: /runner/project/podman.yml:10
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/
ansible-tmp-1786557775.681751-105-40757234402095 `" && echo ansible-tmp-1786557775.681751-105-40757234402095="` 
echo /root/.ansible/tmp/ansible-tmp-1786557775.681751-105-40757234402095 `" ) && sleep 0'
Using module file /usr/lib/python3.11/site-packages/ansible/modules/command.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-10us_789uo/tmpl4gnow3e TO /root/.ansible/tmp/ansible-tmp-1786557775.681751-105-40757234402095/i
AnsiballZ_command.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1786557775.681751-105-40757234402095/ /root/.ansible/tmp/
ansible-tmp-1786557775.681751-105-40757234402095/AnsiballZ_command.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3.11 /root/.ansible/tmp/ansible-tmp-1786557775.681751-105-40757234402095/AnsiballZ_command.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1786557775.681751-105-40757234402095/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
    "changed": true,
    "cmd": [
        "podman",
        "info"
    ],
    "delta": "0:00:00.326330",
    "end": "2026-08-12 18:02:56.206945",
    "invocation": {
        "module_args": {
            "_raw_params": "podman info",
            "_uses_shell": false,
            "argv": null,
            "chdir": null,
            "creates": null,
            "executable": null,
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true
        }
    },
    "msg": "non-zero return code",
    "rc": 125,
    "start": "2026-08-12 18:02:55.880615",
    "stderr": "time=\\"2026-08-12T18:02:55Z\\" level=warning msg=\\"Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and 
will be removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.\\"\\ntime=\\
"2026-08-12T18:02:55Z\\" level=warning msg=\\"Using rootless single mapping into the namespace. This might break some images. 
Check /etc/subuid and /etc/subgid for adding sub*ids if not using a network user\\"\\ntime=\\"2026-08-12T18:02:55Z\\" level=warning 
msg=\\"Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be removed in a future version. 
Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.\\"\\nError: getting registries: loading registries configuration 
\\"/tmp/ansible_runner_registry_31304149_099_jeal/registries.conf\\": open /tmp/ansible_runner_registry_31304149_099_jeal/registries.conf: 
no such file or directory",
    "stderr_lines": [
        "time=\\"2026-08-12T18:02:55Z\\" level=warning msg=\\"Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be 
removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.\\"",
        "time=\\"2026-08-12T18:02:55Z\\" level=warning msg=\\"Using rootless single mapping into the namespace. This might break some images. 
Check /etc/subuid and /etc/subgid for adding sub*ids if not using a network user\\"",
        "time=\\"2026-08-12T18:02:55Z\\" level=warning msg=\\"Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be 
removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.\\"",
        "Error: getting registries: loading registries configuration \\"/tmp/ansible_runner_registry_31304149_099_jeal/registries.conf\\": 
open /tmp/ansible_runner_registry_31304149_099_jeal/registries.conf: no such file or directory"
    ],
    "stdout": "",
    "stdout_lines": []
}
...ignoring

TASK [debug] *******************************************************************
task path: /runner/project/podman.yml:14
ok: [localhost] => {
    "info.stderr_lines": [
        "time=\\"2026-08-12T18:02:55Z\\" level=warning msg=\\"Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be 
removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.\\"",
        "time=\\"2026-08-12T18:02:55Z\\" level=warning msg=\\"Using rootless single mapping into the namespace. This might break some images. 
Check /etc/subuid and /etc/subgid for adding sub*ids if not using a network user\\"",
        "time=\\"2026-08-12T18:02:55Z\\" level=warning msg=\\"Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be 
removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.\\"",
        "Error: getting registries: loading registries configuration \\"/tmp/ansible_runner_registry_31304149_099_jeal/registries.conf\\": 
open /tmp/ansible_runner_registry_31304149_099_jeal/registries.conf: no such file or directory"
    ]
}
TASK [Pull alpine] *************************************************************
task path: /runner/project/podman.yml:16
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/
ansible-tmp-1786557776.3111598-166-118285985423127 `" && echo ansible-tmp-1786557776.3111598-166-118285985423127="` 
echo /root/.ansible/tmp/ansible-tmp-1786557776.3111598-166-118285985423127 `" ) && sleep 0'
Using module file /usr/lib/python3.11/site-packages/ansible/modules/command.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-10us_789uo/tmp1d7h7tbu TO /root/.ansible/tmp/ansible-tmp-1786557776.3111598-166-118285985423127/AnsiballZ_command.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1786557776.3111598-166-118285985423127/ 
/root/.ansible/tmp/ansible-tmp-1786557776.3111598-166-118285985423127/AnsiballZ_command.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3.11 /root/.ansible/tmp/ansible-tmp-1786557776.3111598-166-118285985423127/AnsiballZ_command.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1786557776.3111598-166-118285985423127/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
    "changed": true,
    "cmd": [
        "podman",
        "pull",
        "docker.io/library/alpine:latest"
    ],
    "delta": "0:00:00.103226",
    "end": "2026-08-12 18:02:56.612993",
    "invocation": {
        "module_args": {
            "_raw_params": "podman pull docker.io/library/alpine:latest",
            "_uses_shell": false,
            "argv": null,
            "chdir": null,
            "creates": null,
            "executable": null,
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true
        }
    },
    "msg": "non-zero return code",
    "rc": 125,
    "start": "2026-08-12 18:02:56.509767",
    "stderr": "time=\\"2026-08-12T18:02:56Z\\" level=warning msg=\\"Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 
and will be removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.
\\"\\ntime=\\"2026-08-12T18:02:56Z\\" level=warning msg=\\"Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be 
removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.\\"\\nError: loading registries 
configuration \\"/tmp/ansible_runner_registry_31304149_099_jeal/registries.conf\\": open /tmp/ansible_runner_registry_31304149_099_jeal/registries.conf: 
no such file or directory",
    "stderr_lines": [
        "time=\\"2026-08-12T18:02:56Z\\" level=warning msg=\\"Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be 
removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.\\"",
        "time=\\"2026-08-12T18:02:56Z\\" level=warning msg=\\"Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be 
removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.\\"",
        "Error: loading registries configuration \\"/tmp/ansible_runner_registry_31304149_099_jeal/registries.conf\\": open 
/tmp/ansible_runner_registry_31304149_099_jeal/registries.conf: no such file or directory"
    ],
    "stdout": "",
    "stdout_lines": []
}
...ignoring
TASK [debug] *******************************************************************
task path: /runner/project/podman.yml:20
ok: [localhost] => {
    "pull": {
        "changed": true,
        "cmd": [
            "podman",
            "pull",
            "docker.io/library/alpine:latest"
        ],
        "delta": "0:00:00.103226",
        "end": "2026-08-12 18:02:56.612993",
        "failed": true,
        "msg": "non-zero return code",
        "rc": 125,
        "start": "2026-08-12 18:02:56.509767",
        "stderr": "time=\\"2026-08-12T18:02:56Z\\" level=warning msg=\\"Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 
and will be removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.\\"
\\ntime=\\"2026-08-12T18:02:56Z\\" level=warning msg=\\"Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be 
removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.\\"\\nError: loading registries 
configuration \\"/tmp/ansible_runner_registry_31304149_099_jeal/registries.conf\\": open /tmp/ansible_runner_registry_31304149_099_jeal/registries.conf: 
no such file or directory",
        "stderr_lines": [
            "time=\\"2026-08-12T18:02:56Z\\" level=warning msg=\\"Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be 
removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.\\"",
            "time=\\"2026-08-12T18:02:56Z\\" level=warning msg=\\"Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and 
will be removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.\\"",
            "Error: loading registries configuration \\"/tmp/ansible_runner_registry_31304149_099_jeal/registries.conf\\": 
open /tmp/ansible_runner_registry_31304149_099_jeal/registries.conf: no such file or directory"
        ],
        "stdout": "",
        "stdout_lines": []
    }
}
PLAY RECAP *********************************************************************
localhost                  : ok=7    changed=3    unreachable=0    failed=0    skipped=0    rescued=0    ignored=2