Skip to content

Commit

Permalink
zabbix_agent role: accept several IPs in zabbix_agent_listenip vari…
Browse files Browse the repository at this point in the history
…able.
  • Loading branch information
BGmot committed Dec 7, 2024
1 parent 645a81a commit 96a2923
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions roles/zabbix_agent/tasks/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@

- name: "Fail invalid specified agent_listenip"
ansible.builtin.fail:
msg: "The agent_listenip does not exist"
msg: "{{ item }} The agent_listenip does not exist"
when:
- zabbix_agent_listenip != '0.0.0.0'
- zabbix_agent_listenip != '127.0.0.1'
- (zabbix_agent_listenip not in ansible_all_ipv4_addresses)
- item != '0.0.0.0'
- item != '127.0.0.1'
- item not in ansible_all_ipv4_addresses
with_items:
"{{ zabbix_agent_listenip | split(',') }}"
tags:
- config

Expand Down

0 comments on commit 96a2923

Please sign in to comment.