mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-12-28 12:55:04 +01:00
23 lines
990 B
YAML
23 lines
990 B
YAML
---
|
|
- name: create {{path_system_maintenance_service_freezer_script}}
|
|
copy:
|
|
src: system-maintenance-service-freezer.py
|
|
dest: "{{path_system_maintenance_service_freezer_script}}"
|
|
when: run_once_system_maintenance_service_freeze is not defined
|
|
|
|
- name: run the system_maintenance_service_freezer tasks once
|
|
set_fact:
|
|
run_once_system_maintenance_service_freeze: true
|
|
when: run_once_system_maintenance_service_freeze is not defined
|
|
|
|
- name: "restart system-maintenance-service.service"
|
|
systemd:
|
|
name: system-maintenance-service-{{system_maintenance_service_freeze_action}}.service
|
|
state: restarted
|
|
enabled: yes
|
|
daemon_reload: yes
|
|
when: maintenance_service_freeze_action_last is not defined or maintenance_service_freeze_action_last != system_maintenance_service_freeze_action
|
|
|
|
- name: "set variable to prevent loading when action status didn't change"
|
|
set_fact:
|
|
maintenance_service_freeze_action_last: "{{system_maintenance_service_freeze_action}}" |