semaphore/tasks/file_managment/zabbix.conf.yml
2024-08-12 01:22:12 +08:00

31 lines
723 B
YAML

- name: Manage file /etc/zabbix/zabbix_agent2.conf
template:
src: files/zabbix_agent2.conf.j2
dest: /etc/zabbix/zabbix_agent2.conf
owner: zabbix
group: zabbix
mode: 0644
notify: zabbix
- name: Manage file /etc/zabbix/zabbix_agentd.psk
template:
src: files/zabbix_agent2.psk
dest: /etc/zabbix/zabbix_agent2.psk
owner: zabbix
group: zabbix
mode: 0644
notify: zabbix
- name: Create zabbix_agentd.conf.d directory if it does not exist
ansible.builtin.file:
path: /etc/zabbix/zabbix_agentd.conf.d/
state: directory
owner: zabbix
group: zabbix
mode: '0755'
notify: zabbix
handlers:
- name: Import handlers
- import_tasks: handlers/zabbix.yml