role_podman/handlers/main.yml

46 lines
1.0 KiB
YAML

---
# handlers file for exim4
- 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 }}"
# source: https://github.com/containers/buildah/issues/5440#issuecomment-2028911573
- name: Fix passt VS pasta
ansible.builtin.file:
state: hard
src: /usr/bin/passt
dest: /usr/bin/pasta
owner: root
group: root
mode: u=rw,g=r,o=r
force: true
when: podman_fix_pasta
become: true
- name: Restart instance
ansible.builtin.reboot:
become: true
- name: Wait SSH is ready
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
- name: Restart rsyslog.service
ansible.builtin.systemd:
state: restarted
name: rsyslog.service
become: true