- name: Install zabbix Agent apt: pkg: - zabbix-agent notify: - restart zabbix-agent - name: Copy agent conf file template: src: zabbix_agentd.conf dest: /etc/zabbix/zabbix_agentd.conf owner: zabbix notify: - restart zabbix-agent - name: Create legacy directories for backwards compability file: path: "{{ item }}" state: directory owner: zabbix with_items: - /var/log/zabbix-agent/ - /etc/zabbix/zabbix_agentd.conf.d notify: - restart zabbix-agent