James E. Blair d5bbb6ba8c ensure-podman: add tasks to configure socket group
The podman socket is owned by root by default, so add a podman group
(like the docker group) to allow the zuul/ansible user to access it.

Also, add support for Ubuntu noble.

Change-Id: I653d9c313c69298da00b139a791a6177d37475cd
2024-08-12 13:13:35 -07:00

33 lines
910 B
YAML

- name: Find distribution installation
include_tasks: "{{ zj_distro_os }}"
with_first_found:
- "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yaml"
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
- "default.yaml"
loop_control:
loop_var: zj_distro_os
- name: Fetch podman version
command: podman version
register: podman_ver
- name: Print podman version installed
debug:
msg: "Podman version: {{ podman_ver.stdout }}"
- name: Validate podman engine
when: ensure_podman_validate
# on purpose to verify that non-root user can call docker/podman
become: false
shell: |
podman version
podman info
podman ps
changed_when: false
- name: Set up docker compatability socket
when: ensure_podman_socket
include_tasks: "root-socket.yaml"