diff --git a/ANSIBLE/icinga.yml b/ANSIBLE/icinga.yml index f98e71e..6102ec9 100644 --- a/ANSIBLE/icinga.yml +++ b/ANSIBLE/icinga.yml @@ -1,5 +1,4 @@ --- -#- import_playbook: httpd.yml - name: Install php and icinga2 web hosts: monitor diff --git a/ANSIBLE/roles/icinga2/tasks/icinga2-ido.yml b/ANSIBLE/roles/icinga2/tasks/icinga2-ido.yml index a65e052..312c779 100644 --- a/ANSIBLE/roles/icinga2/tasks/icinga2-ido.yml +++ b/ANSIBLE/roles/icinga2/tasks/icinga2-ido.yml @@ -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 - diff --git a/ANSIBLE/httpd.yml b/Cleanup/httpd.yml similarity index 100% rename from ANSIBLE/httpd.yml rename to Cleanup/httpd.yml diff --git a/ANSIBLE/templates/index.html.j2 b/Cleanup/templates/index.html.j2 similarity index 100% rename from ANSIBLE/templates/index.html.j2 rename to Cleanup/templates/index.html.j2 diff --git a/ANSIBLE/templates/vhost.conf.j2 b/Cleanup/templates/vhost.conf.j2 similarity index 100% rename from ANSIBLE/templates/vhost.conf.j2 rename to Cleanup/templates/vhost.conf.j2