38 lines
650 B
YAML
38 lines
650 B
YAML
|
---
|
||
|
- name: install packages
|
||
|
apt:
|
||
|
state: latest
|
||
|
pkg:
|
||
|
- zabbix-agent
|
||
|
install_recommends: no
|
||
|
force_apt_get: yes
|
||
|
become: yes
|
||
|
|
||
|
- name: copy config files, scripts and services
|
||
|
copy:
|
||
|
src: "{{ item }}"
|
||
|
dest: "/{{ item }}"
|
||
|
force: yes
|
||
|
mode: preserve
|
||
|
become: yes
|
||
|
with_items:
|
||
|
- srv/common/
|
||
|
- etc/zabbix/zabbix_agentd.conf.d/
|
||
|
|
||
|
- name: Create zabbix log directory
|
||
|
file:
|
||
|
path: /var/log/zabbix-agent
|
||
|
state: directory
|
||
|
mode: '0755'
|
||
|
owner: zabbix
|
||
|
group: zabbix
|
||
|
become: yes
|
||
|
|
||
|
- name: enable zabbix-agent
|
||
|
systemd:
|
||
|
name: zabbix-agent
|
||
|
state: started
|
||
|
enabled: yes
|
||
|
become: yes
|
||
|
|