Files
role_podman/tasks/config.yml

43 lines
1.1 KiB
YAML

---
# tasks file for podman
- name: Disable global podman auto-update
ansible.builtin.systemd_service:
name: podman-auto-update.timer
enabled: false
become: true
- name: Enable lingering for podman user
ansible.builtin.command:
cmd: loginctl enable-linger {{ podman_user }}
creates: /var/lib/systemd/linger/podman
become: true
- name: Enable containers auto-update service
ansible.builtin.systemd_service:
name: podman-auto-update.timer
state: started
daemon_reload: true
scope: user
when: podman_auto_update
become: true
become_user: "{{ podman_user }}"
- name: Create podman user directory tree
ansible.builtin.file:
path: "{{ item.path }}"
owner: "{{ podman_user }}"
group: "{{ podman_user }}"
mode: "{{ item.mode }}"
state: directory
become: true
loop:
- path: "{{ podman_user_homedir }}/.config"
mode: u=rwX,g=,o=
- path: "{{ podman_user_homedir }}/.config/containers"
mode: u=rwX,g=rX,o=rX
- path: "{{ podman_user_homedir }}/.config/containers/systemd"
mode: u=rwX,g=rX,o=rX
loop_control:
label: "{{ item.path }}"