2023-12-13 19:02:07 +01:00
|
|
|
---
|
2023-12-13 19:36:06 +01:00
|
|
|
- name: create {{path_system_maintenance_service_freezer_script}}
|
2023-12-13 19:02:07 +01:00
|
|
|
copy:
|
|
|
|
src: system-maintenance-service-freezer.py
|
2023-12-13 19:36:06 +01:00
|
|
|
dest: "{{path_system_maintenance_service_freezer_script}}"
|
2023-12-13 19:02:07 +01:00
|
|
|
|
|
|
|
- name: Configure system-maintenance-service for each action
|
|
|
|
loop:
|
|
|
|
- freeze
|
|
|
|
- defrost
|
|
|
|
template:
|
|
|
|
src: system-maintenance-service-freezer.service.j2
|
|
|
|
dest: "/etc/systemd/system/system-maintenance-service-{{ item }}.service"
|
|
|
|
notify: "restart system-maintenance-service-{{ item }} service"
|
|
|
|
when: run_once_systemd_freezer is not defined
|
|
|
|
|
|
|
|
- name: run the system_maintenance_service_freezer tasks once
|
|
|
|
set_fact:
|
|
|
|
run_once_systemd_freezer: true
|
|
|
|
when: run_once_systemd_freezer is not defined
|