From e215196682c3fc5ad1145a1724ab91829bad4a5d Mon Sep 17 00:00:00 2001 From: Zack Date: Wed, 1 May 2024 06:11:05 -0500 Subject: [PATCH] fix issue with userparameters failing when trying to deploy a script --- changelogs/fragments/1205-fix-zabbix-agent-scripts.yml | 2 ++ roles/zabbix_agent/tasks/userparameter.yml | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 changelogs/fragments/1205-fix-zabbix-agent-scripts.yml diff --git a/changelogs/fragments/1205-fix-zabbix-agent-scripts.yml b/changelogs/fragments/1205-fix-zabbix-agent-scripts.yml new file mode 100644 index 000000000..daa5ed960 --- /dev/null +++ b/changelogs/fragments/1205-fix-zabbix-agent-scripts.yml @@ -0,0 +1,2 @@ +bugfixes: + - zabbix_agent - Fixed issue to where scripts can be deployed alongside userparameters diff --git a/roles/zabbix_agent/tasks/userparameter.yml b/roles/zabbix_agent/tasks/userparameter.yml index a80be1736..d61e3899f 100644 --- a/roles/zabbix_agent/tasks/userparameter.yml +++ b/roles/zabbix_agent/tasks/userparameter.yml @@ -7,6 +7,7 @@ notify: - restart win zabbix agent with_items: "{{ zabbix_agent_userparameters }}" + when: item.scripts_dir is not defined - name: "Windows | Installing user-defined scripts" ansible.windows.win_copy: @@ -33,6 +34,7 @@ - restart mac zabbix agent become: true with_items: "{{ zabbix_agent_userparameters }}" + when: item.scripts_dir is not defined - name: "Installing user-defined scripts" ansible.builtin.copy: @@ -66,6 +68,7 @@ - restart mac zabbix agent become: true with_items: "{{ zabbix_agent_userparameters }}" + when: item.scripts_dir is not defined - name: "Installing user-defined scripts" ansible.builtin.copy: