Parcourir la source

Add matrix_prometheus_nginxlog_exporter_container_network

pull/2593/head
Slavi Pantaleev il y a 2 ans
Parent
révision
21c2bbb11f
3 fichiers modifiés avec 8 ajouts et 1 suppressions
  1. +2
    -0
      roles/custom/matrix-prometheus-nginxlog-exporter/defaults/main.yml
  2. +5
    -0
      roles/custom/matrix-prometheus-nginxlog-exporter/tasks/setup_install.yml
  3. +1
    -1
      roles/custom/matrix-prometheus-nginxlog-exporter/templates/systemd/matrix-prometheus-nginxlog-exporter.service.j2

+ 2
- 0
roles/custom/matrix-prometheus-nginxlog-exporter/defaults/main.yml Voir le fichier

@@ -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_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
matrix_prometheus_nginxlog_exporter_container_extra_arguments: []



+ 5
- 0
roles/custom/matrix-prometheus-nginxlog-exporter/tasks/setup_install.yml Voir le fichier

@@ -30,6 +30,11 @@
owner: "{{ matrix_user_username }}"
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
ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-prometheus-nginxlog-exporter.service.j2"


+ 1
- 1
roles/custom/matrix-prometheus-nginxlog-exporter/templates/systemd/matrix-prometheus-nginxlog-exporter.service.j2 Voir le fichier

@@ -22,7 +22,7 @@ ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \
--read-only \
--network={{ matrix_docker_network }} \
--network={{ matrix_prometheus_nginxlog_exporter_container_network }} \
{% 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 }} \
{% endif %}


Chargement…
Annuler
Enregistrer