mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-06 19:41:38 +01:00
wip: async icinga & docker compose
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,4 +2,5 @@
|
|||||||
ansible.log
|
ansible.log
|
||||||
files/icinga_master_hosts.conf
|
files/icinga_master_hosts.conf
|
||||||
files/nsca_server.conf
|
files/nsca_server.conf
|
||||||
|
files/async-icinga-config-dynamic.json
|
||||||
hosts.ini
|
hosts.ini
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
- { role : monitoring-influx, tags : [ "influx" ] }
|
- { role : monitoring-influx, tags : [ "influx" ] }
|
||||||
- { role : base, tags : [ "base" ] }
|
- { role : base, tags : [ "base" ] }
|
||||||
|
|
||||||
|
- hosts: kube1
|
||||||
|
roles:
|
||||||
|
- { role : docker-deployments,tags : [ "docker", "kube1" ] }
|
||||||
|
|
||||||
- hosts: monitoring
|
- hosts: monitoring
|
||||||
roles:
|
roles:
|
||||||
- { role : monitoring-master, tags : [ "monitoring-master", "icinga", "grafana" ] }
|
- { role : monitoring-master, tags : [ "monitoring-master", "icinga", "grafana" ] }
|
||||||
|
|||||||
@@ -1,25 +1,61 @@
|
|||||||
|
- name: Create data-dir
|
||||||
|
file:
|
||||||
|
name: /data/
|
||||||
|
state: directory
|
||||||
|
|
||||||
- name: Create opt-dir
|
- name: Create opt-dir
|
||||||
file:
|
file:
|
||||||
name: /opt/
|
name: /opt/
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Copy compose templates
|
- name: Async Icinga mount directory
|
||||||
|
file:
|
||||||
|
name: /data/async-icinga
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: Async Icinga Service (static)
|
||||||
template:
|
template:
|
||||||
src: {{ item }}
|
src: async-icinga-config.json.j2
|
||||||
dest: /opt/
|
dest: /data/async-icinga/
|
||||||
|
|
||||||
|
- name: Async Icinga Service (dynamic from backup file)
|
||||||
|
copy:
|
||||||
|
src: async-icinga-config-dynamic.json
|
||||||
|
dest: /data/async-icinga/
|
||||||
|
|
||||||
|
- name: Create compose directories
|
||||||
|
file:
|
||||||
|
name: "/opt/{{ item }}"
|
||||||
|
state: directory
|
||||||
with_items:
|
with_items:
|
||||||
- athq-landing.yaml
|
- athq-landing
|
||||||
- grafana.yaml
|
- grafana
|
||||||
- potaris-en.yaml
|
- potaris-en
|
||||||
- potaris.yaml
|
- potaris
|
||||||
- sector32.yaml
|
- sector32
|
||||||
|
- async-icinga
|
||||||
|
|
||||||
- name: Copy compose templates
|
- name: Copy compose templates
|
||||||
compose:
|
template:
|
||||||
TODO
|
src: "{{ item }}.yaml"
|
||||||
|
dest: "/opt/{{ item }}/"
|
||||||
with_items:
|
with_items:
|
||||||
- athq-landing.yaml
|
- athq-landing
|
||||||
- grafana.yaml
|
- grafana
|
||||||
- potaris-en.yaml
|
- potaris-en
|
||||||
- potaris.yaml
|
- potaris
|
||||||
- sector32.yaml
|
- sector32
|
||||||
|
- async-icinga
|
||||||
|
|
||||||
|
- name: Deploy compose templates
|
||||||
|
community.docker.docker_compose:
|
||||||
|
project_src: "/opt/{{ item }}/"
|
||||||
|
files:
|
||||||
|
- "{{ item }}.yaml"
|
||||||
|
with_items:
|
||||||
|
- athq-landing
|
||||||
|
- grafana
|
||||||
|
- potaris-en
|
||||||
|
- potaris
|
||||||
|
- sector32
|
||||||
|
- async-icinga
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
[
|
||||||
|
{% for service in async_icinga_static_services %}
|
||||||
|
{
|
||||||
|
"{{ service['name'] }}" : {
|
||||||
|
"timeout" : "{{ service['timeout'] }}",
|
||||||
|
"token" : "{{ service['token'] }}"
|
||||||
|
}
|
||||||
|
}{% if not loop.last %},{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
]
|
||||||
6
roles/docker-deployments/templates/async-icinga.yaml
Normal file
6
roles/docker-deployments/templates/async-icinga.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
async-icinga:
|
||||||
|
volumes:
|
||||||
|
- "/app/config/:/data/async-icinga/"
|
||||||
|
ports:
|
||||||
|
- 5001:5000
|
||||||
|
image: registry.atlantishq.de/athq/async-icinga
|
||||||
Reference in New Issue
Block a user