Create and configure Grafana before serving over Apache
This commit is contained in:
parent
1ef205ff54
commit
bb73e21432
@ -19,6 +19,29 @@
|
||||
priv: "grafana.*:ALL,GRANT"
|
||||
login_user: root
|
||||
login_password: "{{ mysql.root_password }}"
|
||||
- name: Add and configure packages
|
||||
block:
|
||||
- name: Add APT signing key
|
||||
apt_key:
|
||||
url: "https://packages.grafana.com/gpg.key"
|
||||
- name: Add APT repo
|
||||
apt_repository:
|
||||
repo: "deb https://packages.grafana.com/oss/deb stable main"
|
||||
- name: Install Grafana
|
||||
apt:
|
||||
name:
|
||||
- grafana
|
||||
- name: Configure Grafana
|
||||
template:
|
||||
src: "grafana.ini"
|
||||
dest: "/etc/grafana/grafana.ini"
|
||||
mode: "0640"
|
||||
- name: Enable Grafana
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
name: "grafana-server.service"
|
||||
enabled: yes
|
||||
state: "started"
|
||||
- name: Set up Apache
|
||||
block:
|
||||
- name: Enable modules
|
||||
@ -48,27 +71,4 @@
|
||||
name: https
|
||||
vars:
|
||||
website_url: "{{ grafana.url }}"
|
||||
- name: Add and configure packages
|
||||
block:
|
||||
- name: Add APT signing key
|
||||
apt_key:
|
||||
url: "https://packages.grafana.com/gpg.key"
|
||||
- name: Add APT repo
|
||||
apt_repository:
|
||||
repo: "deb https://packages.grafana.com/oss/deb stable main"
|
||||
- name: Install Grafana
|
||||
apt:
|
||||
name:
|
||||
- grafana
|
||||
- name: Configure Grafana
|
||||
template:
|
||||
src: "grafana.ini"
|
||||
dest: "/etc/grafana/grafana.ini"
|
||||
mode: "0640"
|
||||
- name: Enable Grafana
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
name: "grafana-server.service"
|
||||
enabled: yes
|
||||
state: "started"
|
||||
become: yes
|
||||
|
Loading…
Reference in New Issue
Block a user