aboutsummaryrefslogtreecommitdiffstats
path: root/roles/grafana/tasks
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2021-01-22 11:46:52 +0100
committerbinary <me@rgoncalves.se>2021-01-22 11:46:52 +0100
commit642df4fb6653bd67f398a08412e77fda9b2dfe03 (patch)
treead50e720154391a3da5fff77143b8c5ca8dcecd4 /roles/grafana/tasks
parent4bedaf8f9b58985fb898784dbec896d031f4de10 (diff)
downloadinfrastructure-642df4fb6653bd67f398a08412e77fda9b2dfe03.tar.gz
Add grafana to OpenBSD cloud server
Diffstat (limited to 'roles/grafana/tasks')
-rw-r--r--roles/grafana/tasks/main.yml26
1 files changed, 5 insertions, 21 deletions
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
remember that computers suck.