Added monitoring support
This commit is contained in:
@@ -24,3 +24,6 @@ contabo01.a13labs.pt
|
||||
|
||||
[iac]
|
||||
contabo01.a13labs.pt
|
||||
|
||||
[monitoring]
|
||||
contabo01.a13labs.pt
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
- name: Monitoring Playbook (K8s)
|
||||
hosts: monitoring
|
||||
gather_facts: true
|
||||
|
||||
# Specific tasks for this playbook
|
||||
tasks:
|
||||
- name: Set required facts
|
||||
ansible.builtin.set_fact:
|
||||
monitoring_home: "/var/lib/monitoring"
|
||||
influxdb_home: "/var/lib/monitoring/influxdb.data"
|
||||
kapacitor_home: "/var/lib/monitoring/kapacitor.data"
|
||||
cronograf_home: "{{ persistent_data | default('/var/lib') }}/chronograf.data"
|
||||
monitoring_user_id: 1000
|
||||
monitoring_group_id: 1000
|
||||
tags: always
|
||||
|
||||
- name: Create required monitoring data folder
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
state: directory
|
||||
path: "{{ item }}"
|
||||
mode: "0750"
|
||||
owner: "{{ monitoring_user_id }}"
|
||||
group: "{{ monitoring_group_id }}"
|
||||
with_items:
|
||||
- "{{ monitoring_home }}"
|
||||
- "{{ influxdb_home }}"
|
||||
- "{{ kapacitor_home }}"
|
||||
- "{{ cronograf_home }}"
|
||||
tags:
|
||||
- tasks
|
||||
- tasks::folders
|
||||
Reference in New Issue
Block a user