Make http_host_bind_port vars more useful (#1984)
* if variable to bind an exporter container to a host port is set, have matrix-domain.conf (nginx) support this * manipulate some variables to account for just port numbers or 0.0.0.0 IPs * Make sure to use the right variable in the init.yml files * Update roles/matrix-prometheus-node-exporter/tasks/init.yml Co-authored-by: Slavi Pantaleev <slavi@devture.com> * Update roles/matrix-prometheus-postgres-exporter/tasks/init.yml Co-authored-by: Slavi Pantaleev <slavi@devture.com> * remove extraneous variables and whitespace Co-authored-by: Luca Bilke <luca@gmail.com> Co-authored-by: Slavi Pantaleev <slavi@devture.com>development
parent
d65096cd82
commit
c77f2b8a64
@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
# `matrix_prometheus_node_exporter_container_http_host_bind_port_number_raw` contains the raw port number extracted from `matrix_prometheus_node_exporter_container_http_host_bind_port`,
|
||||
# which can contain values like this: ('1234', '127.0.0.1:1234', '0.0.0.0:1234')
|
||||
matrix_prometheus_node_exporter_container_http_host_bind_port_number_raw: "{{ '' if matrix_prometheus_node_exporter_container_http_host_bind_port == '' else (matrix_prometheus_node_exporter_container_http_host_bind_port.split(':')[1] if ':' in matrix_prometheus_node_exporter_container_http_host_bind_port else matrix_prometheus_node_exporter_container_http_host_bind_port) }}"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
# `matrix_prometheus_postgres_exporter_container_http_host_bind_port_number_raw` contains the raw port number extracted from `matrix_prometheus_postgres_exporter_container_http_host_bind_port`,
|
||||
# which can contain values like this: ('1234', '127.0.0.1:1234', '0.0.0.0:1234')
|
||||
matrix_prometheus_postgres_exporter_container_http_host_bind_port_number_raw: "{{ '' if matrix_prometheus_postgres_exporter_container_http_host_bind_port == '' else (matrix_prometheus_postgres_exporter_container_http_host_bind_port.split(':')[1] if ':' in matrix_prometheus_postgres_exporter_container_http_host_bind_port else matrix_prometheus_postgres_exporter_container_http_host_bind_port) }}"
|
Loading…
Reference in new issue