Skip to content
Extraits de code Groupes Projets
Valider c120e2da rédigé par Théo - Le Filament's avatar Théo - Le Filament
Parcourir les fichiers

feat: check all service URLs

parent 1ceaa49c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -90,7 +90,7 @@ define host{
define servicegroup{
servicegroup_name web-services
alias Services Web
members {% for host in groups['odoo_server'] | sort %}{{ host }},Odoo {{ hostvars[host].odoo_url }},{% endfor %}{% for host in groups['owncloud_server'] | sort %}{{ host }},OwnCloud {{ hostvars[host].cloud_url }},{% endfor %}{% for host in groups['docker_odoo'] | sort %}{% for name, values in hostvars[host].odoo_instances.items() | default([]) %}{{ host }},{{ name }} server {{ values.url }},{% endfor %}{% endfor %}{% for host in groups['docker_owncloud'] | union(groups['docker_nextcloud']) | sort %}{{ host }},Cloud Server {{ hostvars[host].cloud_url }},{% if hostvars[host].cloud_onlyoffice is defined %}{{ host }},OnlyOffice Server {{ hostvars[host].cloud_onlyoffice_url }},{% endif %}{% endfor %}{% for host in groups['docker_auth'] | sort %}{% if loop.index == loop.length %}{{ host }},PhpLdapAdmin {{ hostvars[host].ldap_url }},{{ host }},SSO Server {{ hostvars[host].sso_url }}{% else %}{{ host }},PhpLdapAdmin {{ hostvars[host].ldap_url }},{{ host }},SSO Server {{ hostvars[host].sso_url }},{% endif %}{% endfor %}
members {% for host in groups['odoo_server'] | sort %}{{ host }},Odoo {{ hostvars[host].odoo_url }},{% endfor %}{% for host in groups['owncloud_server'] | sort %}{{ host }},OwnCloud {{ hostvars[host].cloud_url }},{% endfor %}{% for host in groups['docker_odoo'] | sort %}{% for name, values in hostvars[host].odoo_instances.items() | default([]) %}{% if values.url is defined %}{{ host }},{{ name }} server {{ values.url }},{% endif %}{% if values.domains is defined and values.domains is string %}{{ host }},{{ name }} server {{ values.domains }},{% else %}{% for domain in values.domains | default([]) %}{{ host }},{{ name }} server {{ domain }},{% endfor %}{% endif %}{% endfor %}{% endfor %}{% for host in groups['docker_owncloud'] | union(groups['docker_nextcloud']) | sort %}{{ host }},Cloud Server {{ hostvars[host].cloud_url }},{% if hostvars[host].cloud_onlyoffice is defined %}{{ host }},OnlyOffice Server {{ hostvars[host].cloud_onlyoffice_url }},{% endif %}{% endfor %}{% for host in groups['docker_auth'] | sort %}{% if loop.index == loop.length %}{{ host }},PhpLdapAdmin {{ hostvars[host].ldap_url }},{{ host }},SSO Server {{ hostvars[host].sso_url }}{% else %}{{ host }},PhpLdapAdmin {{ hostvars[host].ldap_url }},{{ host }},SSO Server {{ hostvars[host].sso_url }},{% endif %}{% endfor %}
}
......
......@@ -327,12 +327,31 @@ define service{
{% endif %}
{% for name, values in hostvars[host].odoo_instances.items() | default([]) %}
{% if values.url is defined %}
define service{
use generic-service
host_name {{ host }}
service_description {{ name }} server {{ values.url }}
check_command check_https!'{{ values.url }}'!/web/login
}
{% endif %}
{% if values.domains is defined and values.domains is string %}
define service{
use generic-service
host_name {{ host }}
service_description {{ name }} server {{ values.domains }}
check_command check_https!'{{ values.domains }}'!/web/login
}
{% else %}
{% for domain in values.domains | default([]) %}
define service{
use generic-service
host_name {{ host }}
service_description {{ name }} server {{ domain }}
check_command check_https!'{{ domain }}'!/web/login
}
{% endfor %}
{% endif %}
# Docker {{ name }} instance
define service{
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter