feat: collect version information once

This commit is contained in:
Simon Cornet 2025-04-16 18:21:41 +02:00
commit 71a6827ca9
3 changed files with 16 additions and 25 deletions

View file

@ -1,14 +1,5 @@
---
# find current zabbix version
- name: "check for old zabbix-release"
ansible.builtin.shell:
cmd: "zabbix_agent2 --version | head -n 1"
changed_when: false
failed_when: false
ignore_errors: true
register: "zabbix_current_version"
# install zabbix-agent2
- name: "install zabbix-agent2"
when: "zabbix_major_version not in zabbix_current_version.stdout"