29 lines
766 B
YAML
29 lines
766 B
YAML
- name: Create data folder on NAS
|
|
ansible.builtin.include_role:
|
|
role: docker/container-data
|
|
vars:
|
|
dir_name: "prometheus"
|
|
|
|
- name: Set facts
|
|
ansible.builtin.set_fact:
|
|
data_dir: "{{ container_data_base_path }}/prometheus"
|
|
|
|
- name: Create config file
|
|
ansible.builtin.file:
|
|
dest: "{{ data_dir }}/prometheus.yml"
|
|
state: touch
|
|
mode: '0777'
|
|
|
|
- name: Deploy prometheus container
|
|
community.docker.docker_container:
|
|
name: prometheus
|
|
image: prom/prometheus
|
|
state: started
|
|
restart_policy: unless-stopped
|
|
# env:
|
|
# GF_SERVER_ROOT_URL: "https://dash.lan.thegrind.dev"
|
|
ports:
|
|
- '9090:9090'
|
|
volumes:
|
|
- "{{ data_dir }}:/prometheus"
|
|
- "{{ data_dir }}/prometheus.yml:/etc/prometheus/prometheus.yml" |