Update to 2022-01-24 12:00

This commit is contained in:
Daniel Berteaud
2022-01-24 12:00:19 +01:00
parent 3157f85dad
commit 1e81d72197
20 changed files with 67 additions and 26 deletions

View File

@@ -0,0 +1,30 @@
---
- when: zabbix_agent2 and zabbix_agent_installed.stat.exists
block:
- name: Stop zabbix-agent
service: name=zabbix-agent state=stopped enabled=False
# Note : don't remove it as it'll be pulled as a dependency of zabbix-agent-addons
tags: zabbix
- when: not zabbix_agent2 and zabbix_agent2_installed.stat.exists
block:
- name: Stop zabbix-agent2
service: name=zabbix-agent2 state=stopped enabled=False
- name: Remove zabbix-agent2
package:
name:
- zabbix-agent2
state: absent
tags: zabbix
- name: Install zabbix-agent
package:
name:
- "{{ (zabbix_agent2) | ternary('zabbix-agent2', 'zabbix-agent') }}"
state: "{{ zabbix_agent_update | ternary('latest', 'present') }}"
notify: restart zabbix-agent
tags: zabbix