You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
36 lines
1.1 KiB
2 years ago
|
- name: Basic server setup
|
||
|
hosts: grafana
|
||
|
tasks:
|
||
|
- name: Verifying repository key is present
|
||
|
ansible.builtin.get_url:
|
||
|
dest: /usr/share/keyrings/grafana.key
|
||
|
url: https://apt.grafana.com/gpg.key
|
||
|
mode: '0444'
|
||
|
- name: Verifying repository installed
|
||
|
ansible.builtin.apt_repository:
|
||
|
repo: deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main
|
||
|
filename: grafana.list
|
||
|
state: present
|
||
|
- name: Performing APT cache update
|
||
|
apt:
|
||
|
upgrade: no
|
||
|
update_cache: yes
|
||
|
cache_valid_time: 86400
|
||
|
- name: Verifying dependencies
|
||
|
ansible.builtin.package:
|
||
|
name:
|
||
|
- adduser
|
||
|
- libfontconfig1
|
||
|
- software-properties-common
|
||
|
state: latest
|
||
|
- name: Installing grafana-enterprise
|
||
|
ansible.builtin.package:
|
||
|
name:
|
||
|
- grafana-enterprise
|
||
|
state: latest
|
||
|
- name: Start and enable services
|
||
|
ansible.builtin.service:
|
||
|
name: grafana-server
|
||
|
state: started
|
||
|
enabled: true
|