Install Grafana after deploying configs
This solves an issue with cloning to a nonempty directory
This commit is contained in:
parent
c7d3c665df
commit
10fdd3453e
@ -19,20 +19,15 @@
|
||||
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
|
||||
block:
|
||||
- name: Create configuration directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
loop:
|
||||
- /etc/grafana
|
||||
- /etc/grafana/provisioning
|
||||
- name: Template out main config
|
||||
template:
|
||||
src: "grafana.ini"
|
||||
@ -46,6 +41,18 @@
|
||||
force: yes
|
||||
notify: restart grafana
|
||||
when: grafana.config_repo is defined
|
||||
- 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: Enable Grafana
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
|
Loading…
Reference in New Issue
Block a user