44 lines
1.2 KiB
YAML

- 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 mon-bot-webserver.py
template:
src: mon-bot-webserver.py.j2
dest: "{{ health_nginx_folder }}mon-bot-webserver.py"
when: run_once_health_nginx is not defined
- name: create mon-bot-webserver.cymais.service
template:
src: mon-bot-webserver.service.j2
dest: /etc/systemd/system/mon-bot-webserver.cymais.service
notify: reload mon-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 gen-timer for {{service_name}}"
include_role:
name: gen-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