2021-03-04 14:39:40 +00:00
|
|
|
- name: Create network
|
|
|
|
docker_network:
|
|
|
|
name: grafana
|
|
|
|
|
2021-02-14 16:24:45 +00:00
|
|
|
- name: Create grafana install directory
|
2021-02-09 09:16:52 +00:00
|
|
|
file:
|
|
|
|
path: /opt/grafana
|
|
|
|
state: directory
|
|
|
|
owner: "{{ docker_user.name }}"
|
|
|
|
mode: "{{ docker_compose_directory_mask }}"
|
|
|
|
become: true
|
|
|
|
|
2021-02-14 16:24:45 +00:00
|
|
|
- name: Install grafana compose file
|
2021-02-09 09:16:52 +00:00
|
|
|
template:
|
2021-03-05 14:40:17 +00:00
|
|
|
src: files/grafana/docker-compose.yml
|
2021-02-09 09:16:52 +00:00
|
|
|
dest: /opt/grafana/docker-compose.yml
|
|
|
|
mode: "{{ docker_compose_file_mask }}"
|
|
|
|
owner: "{{ docker_user.name }}"
|
|
|
|
validate: docker-compose -f %s config
|
|
|
|
notify: restart grafana
|
|
|
|
become: true
|