diff --git a/roles/zabbix_server/tasks/mysql.yml b/roles/zabbix_server/tasks/initialize-mysql.yml similarity index 100% rename from roles/zabbix_server/tasks/mysql.yml rename to roles/zabbix_server/tasks/initialize-mysql.yml diff --git a/roles/zabbix_server/tasks/postgresql.yml b/roles/zabbix_server/tasks/initialize-pgsql.yml similarity index 100% rename from roles/zabbix_server/tasks/postgresql.yml rename to roles/zabbix_server/tasks/initialize-pgsql.yml diff --git a/roles/zabbix_server/tasks/main.yml b/roles/zabbix_server/tasks/main.yml index fd58e5c8b..73002237c 100644 --- a/roles/zabbix_server/tasks/main.yml +++ b/roles/zabbix_server/tasks/main.yml @@ -13,7 +13,6 @@ - name: Set More Variables ansible.builtin.set_fact: - zabbix_db_type_long: "{{ 'postgresql' if zabbix_server_database == 'pgsql' else 'mysql' }}" zabbix_server_fpinglocation: "{{ zabbix_server_fpinglocation if zabbix_server_fpinglocation is defined else _zabbix_server_fpinglocation}}" zabbix_server_fping6location: "{{ zabbix_server_fping6location if zabbix_server_fping6location is defined else _zabbix_server_fping6location}}" tags: @@ -52,8 +51,8 @@ tags: - install -- name: Installing the {{ zabbix_db_type_long }} database - ansible.builtin.include_tasks: "{{ zabbix_db_type_long }}.yml" +- name: "Initialize the database" + ansible.builtin.include_tasks: "initialize-{{ zabbix_server_database }}.yml" - name: "Configure zabbix-server" ansible.builtin.template: