collection of ansible roles
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.
 
 
 
 

47 lines
1.3 KiB

---
- name: install packages
package:
name: "{{ grafana_packages_openbsd }}"
- name: enable and start services
service:
name: "{{ item }}"
state: started
enabled: yes
loop: "{{ grafana_openbsd_services }}"
- name: Download and install grafana icingaweb2 module
git:
repo: "{{ grafana_icingaweb2_module.repo }}"
dest: "{{ grafana_icingaweb2_modules_dir_openbsd }}/{{ grafana_icingaweb2_module.name }}"
update: no
version: "{{ grafana_icingaweb2_module.version }}"
ignore_errors: yes
- name: icinga2 influxdb config template
template:
src: influxdb.conf
dest: /etc/icinga2/features-available/influxdb.conf
- name: enable modules
shell: "icingacli module enable {{ grafana_icingaweb2_module.name }}"
- name: create influxdb
influxdb_database:
hostname: "{{ grafana_influxdb.bindaddr }}"
database_name: "{{ grafana_influxdb.database }}"
username: "{{ grafana_influxdb.username }}"
- name: enable icinga2 influxdb feature
shell: "icinga2 feature enable influxdb"
- name: configure grafana
ini_file:
path: "{{ grafana_config_file_openbsd }}"
section: "{{ item.section }}"
option: "{{ item.option }}"
value: "{{ item.value }}"
loop: "{{ grafana_config_values }}"
notify: restart_grafana