Optimized performance by moving multiple similar when includes to own tasks file

This commit is contained in:
2025-08-11 13:15:31 +02:00
parent 6318611931
commit 1ba50397db
41 changed files with 616 additions and 733 deletions

View File

@@ -0,0 +1,31 @@
- name: Install required Python modules
pacman:
name: python-requests
state: present
- name: "create {{ health_nginx_folder }}"
file:
path: "{{ health_nginx_folder }}"
state: directory
mode: 0755
- name: create sys-hlth-webserver.py
template:
src: sys-hlth-webserver.py.j2
dest: "{{ health_nginx_folder }}sys-hlth-webserver.py"
- name: create sys-hlth-webserver.infinito.service
template:
src: sys-hlth-webserver.service.j2
dest: /etc/systemd/system/sys-hlth-webserver.infinito.service
notify: reload sys-hlth-webserver.infinito.service
- name: "set 'service_name' to '{{ role_name }}'"
set_fact:
service_name: "{{ role_name }}"
- name: "include role for sys-timer for {{service_name}}"
include_role:
name: sys-timer
vars:
on_calendar: "{{on_calendar_health_nginx}}"