testing
This commit is contained in:
4
roles/podman/handlers/main.yml
Normal file
4
roles/podman/handlers/main.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- name: Restart systemd-logind
|
||||
ansible.builtin.systemd:
|
||||
name: systemd-logind
|
||||
state: restarted
|
||||
50
roles/podman/tasks/main.yml
Normal file
50
roles/podman/tasks/main.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
- name: Install Podman
|
||||
ansible.builtin.dnf:
|
||||
name: ["podman", "podman-docker", "podman-compose"]
|
||||
state: present
|
||||
|
||||
- name: Configure Podman to default to docker.io registry
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/containers/registries.conf.d/docker-default.conf
|
||||
content: |
|
||||
[[registry]]
|
||||
prefix = "docker.io"
|
||||
location = "docker.io"
|
||||
|
||||
[[registry]]
|
||||
prefix = ""
|
||||
location = "docker.io"
|
||||
|
||||
[registries]
|
||||
short-name-mode = "disabled"
|
||||
mode: "644"
|
||||
|
||||
- name: Create logind.conf.d directory
|
||||
ansible.builtin.file:
|
||||
path: /etc/systemd/logind.conf.d
|
||||
state: directory
|
||||
mode: "755"
|
||||
|
||||
- name: Create linger directory
|
||||
ansible.builtin.file:
|
||||
path: /var/lib/systemd/linger
|
||||
state: directory
|
||||
mode: "755"
|
||||
|
||||
- name: Enable lingering for oci user
|
||||
ansible.builtin.file:
|
||||
path: /var/lib/systemd/linger/oci
|
||||
state: touch
|
||||
mode: "644"
|
||||
notify: Restart systemd-logind
|
||||
|
||||
- name: Force handler execution for user lingering
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
- name: Create user systemd directory
|
||||
ansible.builtin.file:
|
||||
path: "/home/oci/.config/systemd/user"
|
||||
state: directory
|
||||
mode: "755"
|
||||
owner: oci
|
||||
group: oci
|
||||
Reference in New Issue
Block a user