Refactor: Tidy Ansible folder
This commit is contained in:
parent
b71c793db8
commit
12df029a7b
@ -1,5 +1,4 @@
|
|||||||
---
|
---
|
||||||
#- import_playbook: httpd.yml
|
|
||||||
|
|
||||||
- name: Install php and icinga2 web
|
- name: Install php and icinga2 web
|
||||||
hosts: monitor
|
hosts: monitor
|
||||||
|
@ -18,18 +18,17 @@
|
|||||||
column_case_sensitive: true
|
column_case_sensitive: true
|
||||||
|
|
||||||
- name: Check if IDO schema has already been imported
|
- name: Check if IDO schema has already been imported
|
||||||
stat:
|
ansible.builtin.stat:
|
||||||
path: /var/lib/icinga2/ido_schema_imported.flag
|
path: /var/lib/icinga2/ido_schema_imported.flag
|
||||||
register: ido_schema_marker
|
register: ido_schema_marker
|
||||||
|
|
||||||
- name: Import IDO schema
|
- name: Import IDO schema
|
||||||
shell: |
|
ansible.builtin.shell: |
|
||||||
mysql -u root -p'{{ mariadb_root_password }}' {{ icinga_db_name }} < /usr/share/icinga2-ido-mysql/schema/mysql.sql
|
mysql -u root -p'{{ mariadb_root_password }}' {{ icinga_db_name }} < /usr/share/icinga2-ido-mysql/schema/mysql.sql
|
||||||
when: not ido_schema_marker.stat.exists
|
when: not ido_schema_marker.stat.exists
|
||||||
|
|
||||||
- name: Mark IDO schema as imported
|
- name: Mark IDO schema as imported
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: /var/lib/icinga2/ido_schema_imported.flag
|
path: /var/lib/icinga2/ido_schema_imported.flag
|
||||||
state: touch
|
state: touch
|
||||||
when: not ido_schema_marker.stat.exists
|
when: not ido_schema_marker.stat.exists
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user