From f6a7db3cf01d119895646d664b8f592c6b11824d Mon Sep 17 00:00:00 2001 From: Loric Vandentempel Date: Sat, 10 Jun 2023 23:13:55 +0200 Subject: [PATCH] Fix zabbix_proxy role version validation (#1013) --- changelogs/fragments/proxy_role_fix.yml | 2 ++ roles/zabbix_proxy/tasks/main.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/proxy_role_fix.yml diff --git a/changelogs/fragments/proxy_role_fix.yml b/changelogs/fragments/proxy_role_fix.yml new file mode 100644 index 000000000..199ce3d38 --- /dev/null +++ b/changelogs/fragments/proxy_role_fix.yml @@ -0,0 +1,2 @@ +bugfixes: + - zabbix_proxy role - failed at version validation. Fix adds cast of zabbix_proxy_version to float, similarly to the other roles. diff --git a/roles/zabbix_proxy/tasks/main.yml b/roles/zabbix_proxy/tasks/main.yml index 355cc0fdf..175fe6bd6 100644 --- a/roles/zabbix_proxy/tasks/main.yml +++ b/roles/zabbix_proxy/tasks/main.yml @@ -15,7 +15,7 @@ - name: Set More Variables set_fact: zabbix_proxy_db_long: "{{ 'postgresql' if zabbix_proxy_database == 'pgsql' else zabbix_proxy_database }}" - zabbix_valid_version: "{{ zabbix_proxy_version in zabbix_valid_proxy_versions[ansible_distribution_major_version] }}" + zabbix_valid_version: "{{ zabbix_proxy_version|float in zabbix_valid_proxy_versions[ansible_distribution_major_version] }}" zabbix_short_version: "{{ zabbix_proxy_version | regex_replace('\\.', '') }}" tags: - always