2023-11-17 16:53:56 +01:00
|
|
|
- name: "create {{health_docker_volumes_folder}}"
|
|
|
|
file:
|
|
|
|
path: "{{health_docker_volumes_folder}}"
|
|
|
|
state: directory
|
|
|
|
mode: 0755
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_health_docker_volumes is not defined
|
2023-11-17 16:53:56 +01:00
|
|
|
|
|
|
|
- name: create health-docker-volumes.sh
|
|
|
|
copy:
|
|
|
|
src: health-docker-volumes.sh
|
|
|
|
dest: "{{health_docker_volumes_folder}}health-docker-volumes.sh"
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_health_docker_volumes is not defined
|
2023-11-17 16:53:56 +01:00
|
|
|
|
|
|
|
- name: create health-docker-volumes.service
|
|
|
|
template: src=health-docker-volumes.service.j2 dest=/etc/systemd/system/health-docker-volumes.service
|
|
|
|
notify: reload health-docker-volumes.service
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_health_docker_volumes is not defined
|
2023-11-17 16:53:56 +01:00
|
|
|
|
|
|
|
- name: create health-docker-volumes.timer
|
|
|
|
template:
|
|
|
|
src: health-docker-volumes.timer.j2
|
|
|
|
dest: "/etc/systemd/system/health-docker-volumes.timer"
|
|
|
|
register: health_docker_volumes_timer
|
2024-01-02 12:23:25 +01:00
|
|
|
changed_when: health_docker_volumes_timer.changed or activate_all_timers
|
2023-11-17 16:53:56 +01:00
|
|
|
notify: restart health-docker-volumes.timer
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_health_docker_volumes is not defined
|
|
|
|
|
|
|
|
- name: run the health_docker_volumes tasks once
|
|
|
|
set_fact:
|
|
|
|
run_once_health_docker_volumes: true
|
|
|
|
when: run_once_health_docker_volumes is not defined
|