39 lines
1004 B
YAML
39 lines
1004 B
YAML
- name: Installation paquet zabbix agent
|
|
get_url:
|
|
url: "https://repo.zabbix.com/zabbix/6.4/debian/pool/main/z/zabbix-release/zabbix-release_6.4-1+debian12_all.deb"
|
|
dest: "/tmp"
|
|
|
|
- name: Installation paquet zabbix agent suite
|
|
apt:
|
|
deb: "/tmp/zabbix-release_6.4-1+debian12_all.deb"
|
|
state: present
|
|
|
|
- name: Update apt
|
|
apt:
|
|
update_cache: yes
|
|
|
|
- name: Installation Zabbix agent
|
|
apt:
|
|
name: zabbix-agent
|
|
state: present
|
|
|
|
- name: Mise en place du fichier conf zabbix agent (active)
|
|
template:
|
|
src: zabbix_agentd.conf.j2
|
|
dest: /etc/zabbix/zabbix_agentd.conf
|
|
|
|
- name: Enable Zabbix agent service
|
|
service:
|
|
name: zabbix-agent
|
|
state: restarted
|
|
enabled: yes
|
|
|
|
- name: mise en place script hostcreate
|
|
template:
|
|
src: hostcreate.sh.j2
|
|
dest: /tmp/hostcreate.sh
|
|
|
|
- name: lancement script hostcreate
|
|
command: bash /tmp/hostcreate.sh
|
|
|