From 642df4fb6653bd67f398a08412e77fda9b2dfe03 Mon Sep 17 00:00:00 2001 From: binary Date: Fri, 22 Jan 2021 11:46:52 +0100 Subject: Add grafana to OpenBSD cloud server --- roles/grafana/tasks/main.yml | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) (limited to 'roles/grafana/tasks') diff --git a/roles/grafana/tasks/main.yml b/roles/grafana/tasks/main.yml index 39786af..5df8fa3 100644 --- a/roles/grafana/tasks/main.yml +++ b/roles/grafana/tasks/main.yml @@ -7,38 +7,22 @@ - name: install grafana package: name=grafana state=present -- name: install nginx - package: name=nginx state=present - -- name: ensure grafana group exists - group: name=grafana state=present - -- name: ensure grafana user exists - user: - name: grafana - group: grafana - state: present - -# grafana is supposed to create grafana service! - - name: generate grafana configuration template: src: grafana.ini.j2 dest: /etc/grafana.ini owner: "{{ user_root }}" - group: "{{ grafana_group }}" - mode: 0640 + group: "{{ group_root }}" + mode: 0644 - name: generate reverse proxy configuration for nginx template: - src: grafana_reverse.conf.j2 - dest: /etc/nginx/conf.d/grafana_reverse.conf + src: grafana.conf.nginx.j2 + dest: /etc/nginx/conf.d/grafana.conf owner: "{{ user_root }}" group: "{{ group_root }}" mode: 0644 + when: ansible_distribution != "OpenBSD" - name: start and enable grafana service service: name=grafana state=restarted enabled=true - -- name: start and enable nginx for reverse proxy - service: name=nginx state=restarted enabled=true -- cgit v1.2.3