feat: services var

This commit is contained in:
2023-01-15 18:33:56 +01:00
parent 0530a5218d
commit 4fd118fde6
4 changed files with 16 additions and 5 deletions

1
.gitignore vendored
View File

@@ -5,4 +5,3 @@ files/nsca_server.conf
files/async-icinga-config-dynamic.json files/async-icinga-config-dynamic.json
files/async-icinga-services-dynamic.conf files/async-icinga-services-dynamic.conf
hosts.ini hosts.ini
vars/

View File

@@ -1,3 +1,6 @@
- name: Include service variables
include_vars: services.yaml
- name: Install python packages - name: Install python packages
pip: pip:
name: name:
@@ -88,7 +91,7 @@
- { name : "image-factory", path : "/var/www/python-flask-picture-factory" } - { name : "image-factory", path : "/var/www/python-flask-picture-factory" }
- { name : "serien-ampel", path : "/var/www/serien-ampel" } - { name : "serien-ampel", path : "/var/www/serien-ampel" }
- { name : "simple-log-server", path : "/var/www/simple-log-server" } - { name : "simple-log-server", path : "/var/www/simple-log-server" }
- { name : "soundlib", path : "/var/www/soundlib-interface" } - { name : "soundlib", path : "/var/www/soundlib-interface", external_oidc : true }
notify: notify:
- daemon reload - daemon reload

View File

@@ -4,7 +4,7 @@
{% set port = services[item.name].port %} {% set port = services[item.name].port %}
{% endif %} {% endif %}
{% if item.get("oidc") %} {% if item.get("external_oidc") %}
{% set port = port + 1000 %} {% set port = port + 1000 %}
{% endif %} {% endif %}

9
vars/services.yaml Normal file
View File

@@ -0,0 +1,9 @@
services:
image-factory:
port: 5000
serien-ampel:
port: 5001
simple-log-server:
port: 5002
soundlib:
port: 5003