2020-04-17 18:50:14 +02:00
|
|
|
---
|
|
|
|
- name: Repository and packages, deb/ubuntu
|
|
|
|
block:
|
|
|
|
- name: Install the repository
|
2020-04-17 19:25:12 +02:00
|
|
|
apt: deb={{ zabbix_agent_ubuntu_repo }} state=present
|
2020-04-17 18:50:14 +02:00
|
|
|
register: update_apt_cache
|
|
|
|
|
|
|
|
- name: Update the apt cache if we just installed the repository
|
|
|
|
apt: update_cache=yes
|
|
|
|
when: update_apt_cache is changed
|
|
|
|
|
|
|
|
- name: Install the Zabbix agent package
|
|
|
|
apt: pkg=zabbix-agent state=latest cache_valid_time=1800
|
|
|
|
|
|
|
|
tags: [ 'zabbix', 'zabbix_agent' ]
|