Some mistakes
This commit is contained in:
parent
7c77cba51e
commit
3f60b8a3f8
|
@ -65,6 +65,7 @@ icinga2_server_mariadb_users:
|
|||
priv: "icinga.*:ALL"
|
||||
|
||||
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:
|
||||
- username: root
|
||||
|
|
|
@ -61,3 +61,15 @@
|
|||
group: icingaweb2
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue