Kapisi/roles/Sharingan/tasks/eval.yml

63 lines
1.3 KiB
YAML
Raw Permalink Normal View History

---
2023-10-08 12:28:14 -05:00
- name: Generate monitoring from inventory
delegate_to: localhost
run_once: true
command: "python3 ../bin/generate-monitoring.py {{ inventory_file }}"
- name: Sharingan-Eval service copy
become: yes
register: eval_service
copy:
src: monit/sharingan-eval.service
dest: /usr/lib/systemd/system/sharingan-eval.service
owner: root
group: root
mode: 0750
- name: Sharingan-Eval monitrc
become: yes
template:
src: monitrc.j2
dest: /etc/monitrc
owner: root
group: root
mode: 0700
- name: Sharingan-Eval includes dir
become: yes
loop:
- "/etc/monit.d/"
- "/etc/monit.d/scripts"
- "/etc/monit.d/checks"
file:
path: "{{ item }}"
state: directory
- name: Sharingan-Eval monit templates
become: yes
copy:
src: monit/checks/
dest: /etc/monit.d/checks
owner: root
group: root
mode: 0700
- name: Sharingan-Eval monit scripts
become: yes
copy:
src: monit/scripts/
dest: /etc/monit.d/scripts
owner: root
group: root
mode: 0700
- name: Sharingan-Eval monit host config
become: yes
copy:
src: "monit/hostdefs/{{ inventory_hostname }}"
dest: "/etc/monit.d/{{ inventory_hostname }}"
owner: root
group: root
mode: 0700