Some mistakes

This commit is contained in:
Nemo 2020-10-02 23:26:57 +02:00
parent 7c77cba51e
commit 3f60b8a3f8
2 changed files with 13 additions and 0 deletions

View file

@ -65,6 +65,7 @@ icinga2_server_mariadb_users:
priv: "icinga.*:ALL" priv: "icinga.*:ALL"
icinga2_server_mariadb_icinga_schema_location: "/usr/share/icinga2-ido-mysql/schema/mysql.sql" icinga2_server_mariadb_icinga_schema_location: "/usr/share/icinga2-ido-mysql/schema/mysql.sql"
icinga2_server_mariadb_icingaweb2_schema_location: "/usr/share/icingaweb2/etc/schema/mysql.schema.sql"
icinga2_server_api_users: icinga2_server_api_users:
- username: root - username: root

View file

@ -61,3 +61,15 @@
group: icingaweb2 group: icingaweb2
mode: 0660 mode: 0660
- name: check if Icingaweb2 table and user in MariaDB exist
shell: mysql -u root icingaweb2 -e "SHOW TABLES;" |grep icingaweb_user
register: icinga2_server_register_icingaweb2_imported
changed_when: icinga2_server_register_icingaweb2_imported.rc == 1
failed_when: "'Access denied for' in icinga2_server_register_icingaweb2_imported.stderr"
- name: Icingaweb2 DB schema imported
mysql_db:
state: import
name: icingaweb2
target: "{{ icinga2_server_mariadb_icingaweb2_schema_location }}"
when: icinga2_server_register_icingaweb2_imported.rc == 1