EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit e9b9fcca authored by Nicolas Baudoin's avatar Nicolas Baudoin
Browse files

Several changes and correcting bugs

parent e4ea5315
No related branches found
No related tags found
No related merge requests found
......@@ -41,13 +41,18 @@
setup:
delegate_to: "{{ other_host }}"
run_once: true
register: remote_facts
- name: Set fact for remote host
set_fact:
other_host_facts: "{{ remote_facts.ansible_facts }}"
- name: Capture IPv6 address of the other host now
set_fact:
other_host_ipv6: "{{ hostvars[inventory_hostname]['ansible_' + service_interface]['ipv6'] | selectattr('scope', 'equalto', 'global') | map(attribute='address') | first }}"
other_host_ipv6: "{{ other_host_facts['ansible_' + service_interface]['ipv6'] | selectattr('scope', 'equalto', 'global') | map(attribute='address') | first }}"
when:
- "'ansible_' + service_interface in hostvars[inventory_hostname]"
- "'ipv6' in hostvars[inventory_hostname]['ansible_' + service_interface]"
- "'ansible_' + service_interface in other_host_facts"
- "'ipv6' in other_host_facts['ansible_' + service_interface]"
#debugging
- name: Debug ipv6 current host
debug:
......@@ -60,7 +65,6 @@
line: "{{ current_host_ipv6 }} {{ inventory_hostname }}"
state: present
when:
- use_service_vrf
- current_host_ipv6 is defined
- current_host_ipv6 != ''
......@@ -70,9 +74,8 @@
line: "{{ other_host_ipv6 }} {{ other_host }}"
state: present
when:
- use_service_vrf
- other_host_ipv6 is defined
- other_host_ipv6 != ''
- other_host is defined
- inventory_hostname == ansible_play_hosts_all[0]
###END of the script for adding specific lines on an Hellsing server
\ No newline at end of file
---
#debugging
- name: Checking the right variable is invoked
debug:
msg: "prometheus_config_method: {{ prometheus_config_method }}"
tags: prometheus_conf
- name: prometheus template
template:
src: prometheus.yml.j2
......
......@@ -134,6 +134,7 @@ scrape_configs:
{% if prometheus_config_method == "dns" %}
### New Faster.cz configuration for Prometheus, DNS-based
### The LXC containers
scrape_configs:
- job_name: pct
scheme: https
tls_config:
......@@ -223,8 +224,8 @@ scrape_configs:
scheme: https
tls_config:
ca_file: '/etc/ssl/prometheus_client/root.ca.crt'
cert_file: '/etc/ssl/prometheus_client/hellsing1.eox.at.crt'
key_file: '/etc/ssl/prometheus_client/hellsing1.eox.at.key'
cert_file: '/etc/ssl/prometheus_client/{{fqdn}}.crt'
key_file: '/etc/ssl/prometheus_client/{{fqdn}}.key'
static_configs:
- targets:
- 'hellsing1.eox.at:9100'
......
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