feat: add option to enable podman socket
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/notify Pipeline was successful

This commit is contained in:
Robert Kaussow 2024-02-04 21:12:50 +01:00
parent bce4cbbf1e
commit 1b78e3e723
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 10 additions and 0 deletions

View File

@ -20,3 +20,5 @@ podman_nsremap_range_length: 65536
# state: present
# @end
podman_registries: []
podman_socket_enabled: False

View File

@ -56,3 +56,11 @@
loop: "{{ podman_registries }}"
loop_control:
label: "{{ item.url }}"
- name: Enable podman socket
ansible.builtin.service:
name: podman.socket
daemon_reload: True
enabled: "{{ podman_socket_enabled | bool }}"
masked: "{{ not podman_socket_enabled | bool }}"
state: "{{ podman_socket_enabled | bool | ternary('started', 'stopped', 'started') }}"