Add Grafana running in Podman

This commit is contained in:
Thomas Kleinendorst 2024-09-18 14:33:20 +02:00
parent 79913e9d03
commit b2acd918b5
4 changed files with 47 additions and 9 deletions

View file

@ -8,3 +8,33 @@
- name: Include the Prometheus - alertmanager role
ansible.builtin.include_role:
name: prometheus.prometheus.alertmanager
# region: Install Grafana
- name: Include user role
ansible.builtin.include_role:
name: user
vars:
user_username: "{{ grafana_username }}"
user_password: "{{ grafana_password }}"
- name: Create the grafana container
ansible.builtin.include_role:
name: podman-container
apply:
become: true
become_user: "{{ grafana_username }}"
vars:
podman_container_name: grafana-server
podman_container_image: docker.io/grafana/grafana
podman_container_tag: "{{ grafana_version }}"
podman_container_env:
GF_INSTALL_PLUGINS: "grafana-clock-panel 2.1.7"
podman_container_publish:
- 127.0.0.1:3000:3000
podman_container_volumes:
- name: grafana_storage
mnt: /var/lib/grafana
- name: Include simple-reverse-proxy role
ansible.builtin.include_role:
name: simple-reverse-proxy
vars:
simple_reverse_proxy_internal_port: 3000
simple_reverse_proxy_internal_subdomain: grafana