--- - 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