Add matrix_prometheus_nginxlog_exporter_container_network

housekeeping^2
Slavi Pantaleev 2 years ago
parent ade312e6f6
commit 21c2bbb11f

@ -28,6 +28,8 @@ matrix_prometheus_nginxlog_exporter_dashboard_urls: []
matrix_prometheus_nginxlog_exporter_base_path: "{{ matrix_base_data_path }}/prometheus-nginxlog-exporter" matrix_prometheus_nginxlog_exporter_base_path: "{{ matrix_base_data_path }}/prometheus-nginxlog-exporter"
matrix_prometheus_nginxlog_exporter_config_path: "{{ matrix_prometheus_nginxlog_exporter_base_path }}/config" matrix_prometheus_nginxlog_exporter_config_path: "{{ matrix_prometheus_nginxlog_exporter_base_path }}/config"
matrix_prometheus_nginxlog_exporter_container_network: "{{ matrix_docker_network }}"
# A list of extra docker arguments to pass to the container # A list of extra docker arguments to pass to the container
matrix_prometheus_nginxlog_exporter_container_extra_arguments: [] matrix_prometheus_nginxlog_exporter_container_extra_arguments: []

@ -30,6 +30,11 @@
owner: "{{ matrix_user_username }}" owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}" group: "{{ matrix_user_groupname }}"
- name: Ensure prometheus-nginxlog-exporter container network is created
community.general.docker_network:
name: "{{ matrix_prometheus_nginxlog_exporter_container_network }}"
driver: bridge
- name: Ensure matrix-prometheus-nginxlog-exporter.service installed - name: Ensure matrix-prometheus-nginxlog-exporter.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-prometheus-nginxlog-exporter.service.j2" src: "{{ role_path }}/templates/systemd/matrix-prometheus-nginxlog-exporter.service.j2"

@ -22,7 +22,7 @@ ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
--read-only \ --read-only \
--network={{ matrix_docker_network }} \ --network={{ matrix_prometheus_nginxlog_exporter_container_network }} \
{% if matrix_prometheus_nginxlog_exporter_container_http_host_bind_port %} {% if matrix_prometheus_nginxlog_exporter_container_http_host_bind_port %}
-p {{ matrix_prometheus_nginxlog_exporter_container_http_host_bind_port }}:{{ matrix_prometheus_nginxlog_exporter_container_metrics_port }} \ -p {{ matrix_prometheus_nginxlog_exporter_container_http_host_bind_port }}:{{ matrix_prometheus_nginxlog_exporter_container_metrics_port }} \
{% endif %} {% endif %}

Loading…
Cancel
Save