Refactor: Tidy Ansible folder

This commit is contained in:
Harvey Baxter 2025-07-04 11:25:09 +01:00
parent b71c793db8
commit 12df029a7b
5 changed files with 3 additions and 5 deletions

View File

@ -1,5 +1,4 @@
---
#- import_playbook: httpd.yml
- name: Install php and icinga2 web
hosts: monitor

View File

@ -18,18 +18,17 @@
column_case_sensitive: true
- name: Check if IDO schema has already been imported
stat:
ansible.builtin.stat:
path: /var/lib/icinga2/ido_schema_imported.flag
register: ido_schema_marker
- 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
when: not ido_schema_marker.stat.exists
- name: Mark IDO schema as imported
file:
ansible.builtin.file:
path: /var/lib/icinga2/ido_schema_imported.flag
state: touch
when: not ido_schema_marker.stat.exists