mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 23:38:13 +02:00
THE HUGE REFACTORING CALENDER WEEK 33; Optimized Matrix and during this updated variables, and implemented better reset and cleanup mode handling, also solved some initial setup bugs
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
- name: Find all {{ SYS_SERVICE_SUFFIX }} units
|
||||
find:
|
||||
paths: /etc/systemd/system
|
||||
patterns: '*.{{ SYS_SERVICE_SUFFIX }}'
|
||||
register: infinito_timers
|
||||
|
||||
- name: Disable and stop each infinito timer
|
||||
systemd:
|
||||
name: "{{ item.path | basename }}"
|
||||
enabled: no
|
||||
state: stopped
|
||||
loop: "{{ infinito_timers.files }}"
|
||||
loop_control:
|
||||
label: "{{ item.path | basename }}"
|
||||
|
||||
- name: Remove all {{ SYS_SERVICE_SUFFIX }} files
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: absent
|
||||
loop: "{{ infinito_timers.files }}"
|
||||
loop_control:
|
||||
label: "{{ item.path | basename }}"
|
||||
|
||||
- name: Reload systemd daemon
|
||||
command: systemctl daemon-reload
|
||||
become: true
|
@@ -1,11 +1,9 @@
|
||||
|
||||
- name: "reset (if enabled)"
|
||||
include_tasks: 01_reset.yml
|
||||
when: MODE_RESET | bool and run_once_sys_timer is not defined
|
||||
|
||||
- name: run {{ role_name }} once
|
||||
set_fact:
|
||||
run_once_sys_timer: true
|
||||
- block:
|
||||
- name: "Include sys-systemctl"
|
||||
include_role:
|
||||
name: sys-systemctl
|
||||
when: run_once_sys_systemctl is not defined
|
||||
- include_tasks: utils/run_once.yml
|
||||
when: run_once_sys_timer is not defined
|
||||
|
||||
- name: create {{ sys_timer_file }}
|
||||
|
Reference in New Issue
Block a user