mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Optimized performance by moving multiple similar when includes to own tasks file
This commit is contained in:
31
roles/sys-hlth-webserver/tasks/01_core.yml
Normal file
31
roles/sys-hlth-webserver/tasks/01_core.yml
Normal 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}}"
|
Reference in New Issue
Block a user