45 lines
997 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
- name: Install Icinga Web 2 and dependencies
apt:
name:
- icingaweb2
- icingacli
- monitoring-plugins-contrib
- icinga-x509
- apache2
- php
- php-mysql
- php-xml
- php-intl
- php-cli
- php-gd
- php-curl
state: present
update_cache: yes
- name: Create Icinga Web 2 DB
community.mysql.mysql_db:
name: "{{ icingaweb2_db_name }}"
state: present
login_user: root
login_password: "{{ mariadb_root_password }}"
- name: Create Icinga Web 2 DB user
community.mysql.mysql_user:
name: "{{ icingaweb2_db_user }}"
password: "{{ icingaweb2_db_password }}"
priv: "{{ icingaweb2_db_name }}.*:ALL"
host: localhost
state: present
login_user: root
login_password: "{{ mariadb_root_password }}"
# Optional: Setup from CLI (optional often done in web UI)
# icingacli setup config directory etc.
- name: Restart apache2
service:
name: apache2
state: restarted