Skip to content

Commit

Permalink
the api task should be with explicit become false
Browse files Browse the repository at this point in the history
Undo some changes of commit 5480ff7 

The community.zabbix.zabbix_host module with the delegate_to parameter should not be executed with "become true" if the role zabbix_agent is applied with "become true".

It is possible that the user executing the ansible script has sudo permission on the remote computer that the zabbix_agent role will be executed on, but does not have sudo permission on the local computer from which the ansible script is initially executed.

The same applies to the other modules of this task.
  • Loading branch information
emrocha authored Sep 14, 2024
1 parent 037dacb commit 1a45838
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions roles/zabbix_agent/tasks/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
until: zabbix_api_hostgroup_created is succeeded
retries: 10
delegate_to: "{{ zabbix_api_server_host }}"
become: false
tags:
- api

Expand Down Expand Up @@ -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
Expand All @@ -61,5 +63,6 @@
retries: 10
no_log: "{{ ansible_verbosity < 3 }}"
delegate_to: "{{ zabbix_api_server_host }}"
become: false
tags:
- api

0 comments on commit 1a45838

Please sign in to comment.