Use host network for grafana container.
This commit is contained in:
parent
0c09960d3f
commit
72bb97aa16
@ -8,7 +8,7 @@
|
|||||||
failed_when: "result_grafana_systemd_stop is failed and 'Could not find the requested service' not in result_grafana_systemd_stop.msg"
|
failed_when: "result_grafana_systemd_stop is failed and 'Could not find the requested service' not in result_grafana_systemd_stop.msg"
|
||||||
|
|
||||||
- name: Check if grafana container is running
|
- name: Check if grafana container is running
|
||||||
command: 'podman ps -q --filter "name=grafana"'
|
command: 'podman ps -q --filter "name=^grafana$"'
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: podman_ps
|
register: podman_ps
|
||||||
become: true
|
become: true
|
||||||
@ -87,24 +87,15 @@
|
|||||||
changed_when: duplicity_result.rc is defined and duplicity_result.rc == 0
|
changed_when: duplicity_result.rc is defined and duplicity_result.rc == 0
|
||||||
when: not grafana_restored_flag.stat.exists
|
when: not grafana_restored_flag.stat.exists
|
||||||
|
|
||||||
- name: Create podman networks
|
|
||||||
containers.podman.podman_network:
|
|
||||||
name: "{{ item }}"
|
|
||||||
become: true
|
|
||||||
with_items:
|
|
||||||
- reverse-proxy
|
|
||||||
|
|
||||||
- name: Create grafana container
|
- name: Create grafana container
|
||||||
containers.podman.podman_container:
|
containers.podman.podman_container:
|
||||||
name: grafana
|
name: grafana
|
||||||
image: docker.io/grafana/grafana:10.2.4
|
image: docker.io/grafana/grafana:10.2.4
|
||||||
state: present
|
state: present
|
||||||
network:
|
network:
|
||||||
- reverse-proxy
|
- host
|
||||||
- mysqlnet
|
|
||||||
expose:
|
expose:
|
||||||
- "3000/tcp"
|
- "3000/tcp"
|
||||||
dns_search: "{{ SHORTNAME }}-sub.{{ DOMAIN }}"
|
|
||||||
volume:
|
volume:
|
||||||
- /mnt/volumes/var_lib_grafana/data:/var/lib/grafana:Z
|
- /mnt/volumes/var_lib_grafana/data:/var/lib/grafana:Z
|
||||||
- /mnt/volumes/etc_grafana/data:/etc/grafana:Z
|
- /mnt/volumes/etc_grafana/data:/etc/grafana:Z
|
||||||
|
Loading…
Reference in New Issue
Block a user