fix: Review CoreOS compatibility

This commit is contained in:
2025-03-17 01:59:03 +01:00
parent 3cfe5831f2
commit 5b872ba3cb
10 changed files with 138 additions and 75 deletions

25
tasks/containers.yml Normal file
View File

@@ -0,0 +1,25 @@
---
# tasks file for podman
- name: Deploy containers
containers.podman.podman_container: "{{ container }}"
become: true
become_user: "{{ podman_user }}"
loop: "{{ podman_containers }}"
loop_control:
label: "{{ item.name }}"
register: deployed_containers
vars:
container: "{{ podman_containers_defaults | ansible.builtin.combine(item) }}"
- name: Start or restart containers
ansible.builtin.systemd_service:
name: "{{ item.item.name }}.service"
state: "{{ 'restarted' if item.changed else 'started' }}"
daemon_reload: true
scope: user
become: true
become_user: "{{ podman_user }}"
loop: "{{ deployed_containers.results }}"
loop_control:
label: "{{ item.item.name }}"