-
Notifications
You must be signed in to change notification settings - Fork 3
/
grafana.yaml
executable file
·29 lines (29 loc) · 905 Bytes
/
grafana.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
- hosts: all
remote_user: root
tasks:
- name: download grafana
get_url:
url: https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.2.2-1.x86_64.rpm
dest: /root/
- name: install basic dependencies
action: >
{{ ansible_pkg_mgr }} name={{ item }} state=present update_cache=yes
with_items:
- initscripts
- fontconfig
- urw-fonts
- name: install ansible rpm from a local file
yum:
name: /root/grafana-5.2.2-1.x86_64.rpm
state: present
- name: configure systemd to use service
systemd:
daemon_reload: yes
enabled: yes
state: started
name: grafana-server
- name: Extract Prometheus in opt
shell: /sbin/chkconfig --add grafana-server && systemctl daemon-reload && systemctl start grafana-server
args:
executable: /bin/bash