diff --git a/changelogs/fragments/1393-fix-api-tasks-in-zabbix-agent-role-to-run-without-sudo.yml b/changelogs/fragments/1393-fix-api-tasks-in-zabbix-agent-role-to-run-without-sudo.yml new file mode 100644 index 000000000..dab355b17 --- /dev/null +++ b/changelogs/fragments/1393-fix-api-tasks-in-zabbix-agent-role-to-run-without-sudo.yml @@ -0,0 +1,2 @@ +bugfixes: + - zabbix_agent Role - Set become parameter explicitly to false for API tasks to run without sudo on the local computer. diff --git a/roles/zabbix_agent/tasks/api.yml b/roles/zabbix_agent/tasks/api.yml index 543cda23a..c5dcc4a82 100644 --- a/roles/zabbix_agent/tasks/api.yml +++ b/roles/zabbix_agent/tasks/api.yml @@ -9,6 +9,7 @@ until: zabbix_api_hostgroup_created is succeeded retries: 10 delegate_to: "{{ zabbix_api_server_host }}" + become: false tags: - api @@ -43,6 +44,7 @@ until: zabbix_api_host_created is succeeded retries: 10 delegate_to: "{{ zabbix_api_server_host }}" + become: false changed_when: false tags: - api @@ -61,5 +63,6 @@ retries: 10 no_log: "{{ ansible_verbosity < 3 }}" delegate_to: "{{ zabbix_api_server_host }}" + become: false tags: - api