role_podman/handlers/main.yml

46 lines
1.0 KiB
YAML
Raw Normal View History

2024-04-18 19:26:32 +00:00
---
# handlers file for exim4
2024-10-22 09:14:15 +00:00
- name: Set default permissions on volumes folders
ansible.builtin.file:
path: "{{ item.path }}"
owner: "{{ podman_user }}"
group: "{{ podman_user }}"
become: true
loop: "{{ folders.results | selectattr('changed', 'equalto', true) }}"
loop_control:
label: "{{ item.path }}"
2024-06-08 01:09:43 +00:00
# source: https://github.com/containers/buildah/issues/5440#issuecomment-2028911573
2024-10-22 09:14:15 +00:00
- name: Fix passt VS pasta
2024-06-08 01:09:43 +00:00
ansible.builtin.file:
state: hard
src: /usr/bin/passt
dest: /usr/bin/pasta
2024-10-22 09:14:15 +00:00
owner: root
group: root
mode: u=rw,g=r,o=r
force: true
2024-06-08 01:09:43 +00:00
when: podman_fix_pasta
become: true
2024-10-22 09:14:15 +00:00
- name: Restart instance
2024-06-06 00:16:51 +00:00
ansible.builtin.reboot:
become: true
2024-10-22 09:14:15 +00:00
- name: Wait SSH is ready
2024-06-06 00:16:51 +00:00
ansible.builtin.wait_for:
host: "{{ podman_ssh_host }}"
port: "{{ podman_ssh_port }}"
search_regex: OpenSSH
delay: 30
timeout: 900
sleep: 10
delegate_to: 127.0.0.1
2024-10-22 09:14:15 +00:00
- name: Restart rsyslog.service
2024-04-18 19:26:32 +00:00
ansible.builtin.systemd:
state: restarted
name: rsyslog.service
become: true