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"
|
||||
|
||||
- name: Check if grafana container is running
|
||||
command: 'podman ps -q --filter "name=grafana"'
|
||||
command: 'podman ps -q --filter "name=^grafana$"'
|
||||
changed_when: false
|
||||
register: podman_ps
|
||||
become: true
|
||||
@ -87,24 +87,15 @@
|
||||
changed_when: duplicity_result.rc is defined and duplicity_result.rc == 0
|
||||
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
|
||||
containers.podman.podman_container:
|
||||
name: grafana
|
||||
image: docker.io/grafana/grafana:10.2.4
|
||||
state: present
|
||||
network:
|
||||
- reverse-proxy
|
||||
- mysqlnet
|
||||
- host
|
||||
expose:
|
||||
- "3000/tcp"
|
||||
dns_search: "{{ SHORTNAME }}-sub.{{ DOMAIN }}"
|
||||
volume:
|
||||
- /mnt/volumes/var_lib_grafana/data:/var/lib/grafana:Z
|
||||
- /mnt/volumes/etc_grafana/data:/etc/grafana:Z
|
||||
|
Loading…
Reference in New Issue
Block a user