mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-06 10:21:34 +02:00
Huge role refactoring/cleanup. Other commits will propably follow. Because some bugs will exist. Still important for longrun and also for auto docs/help/slideshow generation
This commit is contained in:
43
roles/monitor-bot-webserver/tasks/main.yml
Normal file
43
roles/monitor-bot-webserver/tasks/main.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
- name: Install required Python modules
|
||||
pacman:
|
||||
name: python-requests
|
||||
state: present
|
||||
when: run_once_health_nginx is not defined
|
||||
|
||||
- name: "create {{ health_nginx_folder }}"
|
||||
file:
|
||||
path: "{{ health_nginx_folder }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
when: run_once_health_nginx is not defined
|
||||
|
||||
- name: create monitor-bot-webserver.py
|
||||
template:
|
||||
src: monitor-bot-webserver.py.j2
|
||||
dest: "{{ health_nginx_folder }}monitor-bot-webserver.py"
|
||||
when: run_once_health_nginx is not defined
|
||||
|
||||
- name: create monitor-bot-webserver.cymais.service
|
||||
template:
|
||||
src: monitor-bot-webserver.service.j2
|
||||
dest: /etc/systemd/system/monitor-bot-webserver.cymais.service
|
||||
notify: reload monitor-bot-webserver.cymais.service
|
||||
when: run_once_health_nginx is not defined
|
||||
|
||||
- name: set service_name to the name of the current role
|
||||
set_fact:
|
||||
service_name: "{{ role_name }}"
|
||||
when: run_once_health_nginx is not defined
|
||||
|
||||
- name: "include role for generic-timer for {{service_name}}"
|
||||
include_role:
|
||||
name: generic-timer
|
||||
vars:
|
||||
on_calendar: "{{on_calendar_health_nginx}}"
|
||||
when: run_once_health_nginx is not defined
|
||||
|
||||
- name: run the health_nginx tasks once
|
||||
set_fact:
|
||||
run_once_health_nginx: true
|
||||
when: run_once_health_nginx is not defined
|
||||
|
Reference in New Issue
Block a user