Skip to content
Snippets Groups Projects
Commit 53b7f979 authored by jabertwo's avatar jabertwo
Browse files

fixed icinga test deployment

parent de16cb64
No related branches found
No related tags found
No related merge requests found
...@@ -42,4 +42,11 @@ oauth_global: ...@@ -42,4 +42,11 @@ oauth_global:
token_url: https://uffd.test-warpzone.de/oauth2/token token_url: https://uffd.test-warpzone.de/oauth2/token
userinfo_url: https://uffd.test-warpzone.de/oauth2/userinfo userinfo_url: https://uffd.test-warpzone.de/oauth2/userinfo
logout_url: https://uffd.test-warpzone.de/logout logout_url: https://uffd.test-warpzone.de/logout
metrics_url: https://uffd.test-warpzone.de/metrics metrics_url: https://uffd.test-warpzone.de/metrics
\ No newline at end of file
# Matrix Settings
matrix:
domain: matrix.warpzone.ms
public_url: https://matrix.warpzone.ms
identity_server: https://matrix.warpzone.ms
notifications_room_id: "!QxrpmOPYwofaPFqKMY:matrix.warpzone.ms"
\ No newline at end of file
...@@ -69,7 +69,6 @@ ...@@ -69,7 +69,6 @@
servicename: icinga, servicename: icinga,
basedir: "/srv/{{ servicename }}", basedir: "/srv/{{ servicename }}",
domain: "icinga.test-warpzone.de", domain: "icinga.test-warpzone.de",
groupname: test,
api_port: 5665, api_port: 5665,
mysql_port: 33306 mysql_port: 33306
} }
...@@ -251,7 +250,6 @@ ...@@ -251,7 +250,6 @@
servicename: icinga, servicename: icinga,
basedir: /srv/icinga, basedir: /srv/icinga,
domain: icinga.warpzone.ms, domain: icinga.warpzone.ms,
groupname: prod,
api_port: 5665, api_port: 5665,
mysql_port: 33306 mysql_port: 33306
} }
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
- { path: "{{ basedir }}/secrets/icinga_api_pass", length: 8 } - { path: "{{ basedir }}/secrets/icinga_api_pass", length: 8 }
- { path: "{{ basedir }}/secrets/mysql_admin_pass", length: 12 } - { path: "{{ basedir }}/secrets/mysql_admin_pass", length: 12 }
- { path: "{{ basedir }}/secrets/mysql_user_pass", length: 12 } - { path: "{{ basedir }}/secrets/mysql_user_pass", length: 12 }
- { path: "{{ basedir }}/secrets/matrix_notification_access_token", length: -1 }
- name: Setup OAuth Client Info - name: Setup OAuth Client Info
...@@ -98,7 +99,6 @@ ...@@ -98,7 +99,6 @@
- etc/icinga/conf.d/api-users.conf - etc/icinga/conf.d/api-users.conf
- etc/icinga/conf.d/commands2.conf - etc/icinga/conf.d/commands2.conf
- etc/icinga/conf.d/groups.conf - etc/icinga/conf.d/groups.conf
- etc/icinga/conf.d/hosts_manual.conf
- etc/icinga/conf.d/hosts.conf - etc/icinga/conf.d/hosts.conf
# - etc/icinga/conf.d/notifications_pushover.conf # - etc/icinga/conf.d/notifications_pushover.conf
- etc/icinga/conf.d/notifications.conf - etc/icinga/conf.d/notifications.conf
...@@ -124,5 +124,4 @@ ...@@ -124,5 +124,4 @@
- name: "start {{ servicename }} docker" - name: "start {{ servicename }} docker"
community.docker.docker_compose_v2: community.docker.docker_compose_v2:
project_src: "{{ basedir }}" project_src: "{{ basedir }}"
state: present state: present
build: "{{ dockerconfig.changed }}" \ No newline at end of file
{% for host in groups['{{ groupname }}'] %} {% for host in groups['test'] %}
{% if hostvars[host].alert is defined and hostvars[host].alert %} {% if hostvars[host].alert is defined and hostvars[host].alert %}
...@@ -16,10 +16,6 @@ object Host "{{ host }}" { ...@@ -16,10 +16,6 @@ object Host "{{ host }}" {
vars.ext_ip6 = "{{ hostvars[host].ext_ip6 }}" vars.ext_ip6 = "{{ hostvars[host].ext_ip6 }}"
{% endif %} {% endif %}
{% if host in monitoring.internal_ldap_servers %}
vars.is_ldapserver = "True"
{% endif %}
vars.os = "Linux" vars.os = "Linux"
vars.prometheus = true vars.prometheus = true
} }
......
object Host "wz-router" {
import "generic-host"
address = "192.168.0.1"
groups = [ "network" ]
}
object Host "wz-sw-core" {
import "generic-host"
address = "192.168.0.2"
groups = [ "network" ]
}
object Host "wz-sw-access" {
import "generic-host"
address = "192.168.0.3"
# Keine Notifications, da der Switch aus ist wenn die Zone geschlossen ist
vars.enable_nofitications = false
groups = [ "network" ]
}
object Host "wz-sw-dach" {
import "generic-host"
address = "192.168.0.4"
groups = [ "network" ]
}
object Host "wz-ap-dach" {
import "generic-host"
address = "192.168.0.13"
groups = [ "network" ]
}
object Host "wz-ap-eingang" {
import "generic-host"
address = "192.168.0.14"
groups = [ "network" ]
}
object Host "wz-ap-lounge" {
import "generic-host"
address = "192.168.0.10"
groups = [ "network" ]
}
object Host "wz-ap-vortrag" {
import "generic-host"
address = "192.168.0.12"
groups = [ "network" ]
}
object Host "wz-ap-werkstatt" {
import "generic-host"
address = "192.168.0.11"
groups = [ "network" ]
}
object Host "eq3max-cube" {
import "generic-host"
address = "{{ eq3max.cube_host }}"
groups = [ "network" ]
}
{% for host in groups['{{ groupname }}'] %} {% for host in groups['test'] %}
{% if hostvars[host].borgbackup_repos is defined %} {% if hostvars[host].borgbackup_repos is defined %}
{% for repo in hostvars[host].borgbackup_repos %} {% for repo in hostvars[host].borgbackup_repos %}
......
{% for host in groups['{{ groupname }}'] %} {% for host in groups['test'] %}
{% if hostvars[host].alert is defined and hostvars[host].alert %} {% if hostvars[host].alert is defined and hostvars[host].alert %}
{% if hostvars[host].alert.containers is defined %} {% if hostvars[host].alert.containers is defined %}
......
{% for host in groups['{{ groupname }}'] %} {% for host in groups['test'] %}
{% if hostvars[host].ext_ip4 is defined and hostvars[host].ext_ip6 is defined and hostvars[host].webserver_domains is defined %} {% if hostvars[host].ext_ip4 is defined and hostvars[host].ext_ip6 is defined and hostvars[host].webserver_domains is defined %}
{% for domain in hostvars[host].webserver_domains %} {% for domain in hostvars[host].webserver_domains %}
......
{% for host in groups['{{ groupname }}'] %} {% for host in groups['test'] %}
{% if hostvars[host].alert is defined and hostvars[host].alert %} {% if hostvars[host].alert is defined and hostvars[host].alert %}
apply Service "node-exporter" { apply Service "node-exporter" {
......
{% for host in groups['{{ groupname }}'] %} {% for host in groups['test'] %}
{% if hostvars[host].alert is defined and hostvars[host].alert %} {% if hostvars[host].alert is defined and hostvars[host].alert %}
apply Service "node_metrics" { apply Service "node_metrics" {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment