Files
role_podman/tasks/config.yml

46 lines
1.2 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
# 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: "{{ item }}"
creates: /var/lib/systemd/linger/{{ podman_user }}
become: true
loop:
- sudo systemctl --machine={{ podman_user }}@.host --user daemon-reload
- loginctl enable-linger {{ podman_user }}
- 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 }}"