diff --git a/ansible/roles/zabbix-agent/tasks/main.yml b/ansible/roles/zabbix-agent/tasks/main.yml index b0168316..81548d9d 100644 --- a/ansible/roles/zabbix-agent/tasks/main.yml +++ b/ansible/roles/zabbix-agent/tasks/main.yml @@ -14,7 +14,9 @@ when: ansible_distribution == "CentOS" - name: Install Zabbix agent (SmartOS) - pkgin: name=zabbix-agent state=present + shell: pkgin -y install zabbix-agent + register: res + changed_when: "'nothing to do.' not in res.stdout" when: ansible_distribution == "SmartOS" - name: Create Zabbix agent configuration file