From 6ab3157ba2bdc5b6231f36240f34da7013d7a877 Mon Sep 17 00:00:00 2001 From: Erik Berg Date: Thu, 21 Mar 2024 14:19:28 +0000 Subject: [PATCH] Prefix database task-files with initialize It reflects more accurately what we're trying to achieve. Also strip out zabbix_db_type_long, it serves no purpose anymore. --- .../zabbix_server/tasks/{mysql.yml => initialize-mysql.yml} | 0 .../tasks/{postgresql.yml => initialize-pgsql.yml} | 0 roles/zabbix_server/tasks/main.yml | 5 ++--- 3 files changed, 2 insertions(+), 3 deletions(-) rename roles/zabbix_server/tasks/{mysql.yml => initialize-mysql.yml} (100%) rename roles/zabbix_server/tasks/{postgresql.yml => initialize-pgsql.yml} (100%) 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: