aboutsummaryrefslogblamecommitdiffstats
path: root/roles/grafana/tasks/main.yml
blob: 5df8fa3847ff409612a0d13c7e2fda091b6c6fa4 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                         




                                      

                             


                                                      

                                        


                             
                                         


                                                    

# grafana ~~ roles/grafana/tasks/main.yml
# grafana setup

---

- name: install grafana
  package: name=grafana state=present

- name: generate grafana configuration
  template:
    src: grafana.ini.j2
    dest: /etc/grafana.ini
    owner: "{{ user_root }}"
    group: "{{ group_root }}"
    mode: 0644

- name: generate reverse proxy configuration for nginx
  template:
    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
remember that computers suck.