Refactor tasks for compose.yml and add tasks for pihole, homeassistant, and prometheus
Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
This commit is contained in:
42
roles/docker/tasks/prometheus.yml
Normal file
42
roles/docker/tasks/prometheus.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
|
||||
- name: Create prometheus dirs
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
owner: 1000
|
||||
group: 1000
|
||||
mode: '777'
|
||||
state: directory
|
||||
loop:
|
||||
- "{{ prm_config }}"
|
||||
- "{{ prm_data}}"
|
||||
|
||||
- name: Place prometheus config
|
||||
template:
|
||||
owner: 1000
|
||||
mode: '777'
|
||||
src: "templates/aya01/prometheus/prometheus.yml"
|
||||
dest: "{{ prm_config }}/prometheus.yml"
|
||||
|
||||
- name: Create prometheus exporter dir
|
||||
file:
|
||||
path: "{{ exporter_dir }}"
|
||||
owner: 1000
|
||||
group: 1000
|
||||
mode: '755'
|
||||
state: directory
|
||||
|
||||
- name: Create mikrotik exporters config dir
|
||||
file:
|
||||
path: "{{ e_mikrotik_config }}"
|
||||
owner: 1000
|
||||
group: 1000
|
||||
mode: '755'
|
||||
state: directory
|
||||
|
||||
- name: Place mikrotik exporter config
|
||||
template:
|
||||
owner: 1000
|
||||
mode: '400'
|
||||
src: "templates/aya01/prometheus/exporter/mikrotik/config/config.yml"
|
||||
dest: "{{ e_mikrotik_config }}/config.yml"
|
||||
Reference in New Issue
Block a user