Clean up some cruft

This commit is contained in:
2024-02-08 12:57:28 -05:00
parent 4a3c3cad3d
commit a51c8ed2ff
35 changed files with 0 additions and 1173 deletions

67
playbooks/monitoring.yml Normal file
View File

@@ -0,0 +1,67 @@
---
- name: Prometheus
hosts: monitor.mgmt.toal.ca # Hard-coded for now
become: yes
vars:
container_image: prom/prometheus
container_name: prometheus
container_state: running
container_firewall_ports:
- 8090/tcp
container_run_args: >-
-p 8090:8090
-v /home/prometheus/etc:/etc/prometheus:Z
-v /home/prometheus/data:/prometheus:Z
-v /home/prometheus/console_libraries:/usr/share/prometheus/console_libraries:Z
-v /home/prometheus/console_templates:/usr/share/prometheus/consoles:Z
roles:
- ikke_t.podman_container_systemd
pre_tasks:
- name: Directories exist
file:
path: '{{ item }}'
state: directory
owner: nobody
group: nobody
loop:
- /home/prometheus/etc
- /home/prometheus/data
- /home/prometheus/console_libraries
- /home/prometheus/console_template
post_tasks:
- name: Firewall
firewalld:
state: enabled # required. choices: enabled;disabled;present;absent. Enable or disable a setting. For ports: Should this port accept(enabled) or reject(disabled) connections. The states "present" and "absent" can only be used in zone level operations (i.e. when no other parameters but zone and state are set).
permanent: true
port: 9090/tcp
- name: Grafana
hosts: monitor.mgmt.toal.ca # Hard-coded for now
become: yes
vars:
container_image: grafana/grafana
container_name: grafana
container_state: running
container_firewall_ports:
- 3000/tcp
container_run_args: >-
-p 3000:3000
-v /home/grafana/data:/var/lib/grafana:Z
pre_tasks:
- name: Directories exist
file:
path: '{{ item }}'
state: directory
owner: nobody
group: nobody
loop:
- /home/grafana/data
roles:
- ikke_t.podman_container_systemd
post_tasks:
- name: Firewall
firewalld:
state: enabled # required. choices: enabled;disabled;present;absent. Enable or disable a setting. For ports: Should this port accept(enabled) or reject(disabled) connections. The states "present" and "absent" can only be used in zone level operations (i.e. when no other parameters but zone and state are set).
permanent: true
port: 3000/tcp