EOX GitLab Instance
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
prometheus role
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ansible-public
prometheus role
Commits
e9b9fcca
Commit
e9b9fcca
authored
1 year ago
by
Nicolas Baudoin
Browse files
Options
Downloads
Patches
Plain Diff
Several changes and correcting bugs
parent
e4ea5315
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tasks/hellsing_hosts_ipv6.yml
+9
-6
9 additions, 6 deletions
tasks/hellsing_hosts_ipv6.yml
tasks/non_federator.yml
+7
-0
7 additions, 0 deletions
tasks/non_federator.yml
templates/prometheus.yml.j2
+3
-2
3 additions, 2 deletions
templates/prometheus.yml.j2
with
19 additions
and
8 deletions
tasks/hellsing_hosts_ipv6.yml
+
9
−
6
View file @
e9b9fcca
...
...
@@ -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
This diff is collapsed.
Click to expand it.
tasks/non_federator.yml
+
7
−
0
View file @
e9b9fcca
---
#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
...
...
This diff is collapsed.
Click to expand it.
templates/prometheus.yml.j2
+
3
−
2
View file @
e9b9fcca
...
...
@@ -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'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment