2023-11-17 12:35:39 +01:00
|
|
|
- name: "create {{heal_docker}}"
|
2023-11-16 18:42:39 +01:00
|
|
|
file:
|
2023-11-17 12:35:39 +01:00
|
|
|
path: "{{heal_docker}}"
|
2023-11-16 18:42:39 +01:00
|
|
|
state: directory
|
|
|
|
mode: 0755
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_heal_docker is not defined
|
2023-11-16 18:42:39 +01:00
|
|
|
|
|
|
|
- name: create heal-docker.py
|
|
|
|
copy:
|
|
|
|
src: heal-docker.py
|
2023-11-17 12:35:39 +01:00
|
|
|
dest: "{{heal_docker}}heal-docker.py"
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_heal_docker is not defined
|
2023-11-16 18:42:39 +01:00
|
|
|
|
|
|
|
- name: create heal-docker.service
|
|
|
|
template:
|
|
|
|
src: heal-docker.service.j2
|
|
|
|
dest: /etc/systemd/system/heal-docker.service
|
|
|
|
notify: reload heal-docker.service
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_heal_docker is not defined
|
2023-11-16 18:42:39 +01:00
|
|
|
|
|
|
|
- name: create heal-docker.timer
|
|
|
|
template:
|
|
|
|
src: heal-docker.timer.j2
|
|
|
|
dest: "/etc/systemd/system/heal-docker.timer"
|
2023-11-16 19:43:54 +01:00
|
|
|
register: heal_docker_timer
|
2024-01-03 12:07:19 +01:00
|
|
|
changed_when: heal_docker_timer.changed or activate_all_timers | bool
|
2023-12-12 15:10:11 +01:00
|
|
|
notify: restart heal-docker.timer
|
|
|
|
when: run_once_heal_docker is not defined
|
|
|
|
|
|
|
|
- name: run the heal_docker tasks once
|
|
|
|
set_fact:
|
|
|
|
run_once_heal_docker: true
|
|
|
|
when: run_once_heal_docker is not defined
|