You've already forked role_podman
fix: Review CoreOS compatibility
This commit is contained in:
49
tasks/prepare.yml
Normal file
49
tasks/prepare.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
# tasks file for podman
|
||||
|
||||
- name: Create dedicated group
|
||||
ansible.builtin.group:
|
||||
name: "{{ podman_user }}"
|
||||
become: true
|
||||
|
||||
- name: Create dedicated user
|
||||
ansible.builtin.user:
|
||||
name: "{{ podman_user }}"
|
||||
comment: Dedicated Podman user
|
||||
password_lock: true
|
||||
shell: /bin/bash
|
||||
group: podman
|
||||
become: true
|
||||
|
||||
- name: Disable global podman auto-update
|
||||
ansible.builtin.systemd_service:
|
||||
name: podman-auto-update.timer
|
||||
enabled: false
|
||||
become: true
|
||||
|
||||
- name: Enable containers auto-update service
|
||||
ansible.builtin.command:
|
||||
cmd: systemctl --user --machine={{ podman_user }}@ start podman-auto-update.timer
|
||||
when: podman_auto_update
|
||||
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: Create subvolumes paths
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.1 | split(':') | first }}"
|
||||
state: directory
|
||||
mode: u=rwX,g=rX,o=rX
|
||||
become: true
|
||||
loop: "{{ q('ansible.builtin.subelements', podman_containers, 'volumes', {'skip_missing': True}) }}"
|
||||
loop_control:
|
||||
label: "{{ item.0.name }}"
|
||||
register: folders
|
||||
notify: Set default permissions on volumes folders
|
||||
|
||||
- name: Execute handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
Reference in New Issue
Block a user