Ajout role Zabbix-cli + ajout des agents dans les srv

This commit is contained in:
root 2023-12-22 15:00:33 +01:00
parent 92c6b3eb89
commit fb900be1e4
10 changed files with 68 additions and 6 deletions

View File

@ -0,0 +1,14 @@
# Rôle nagios
***
Rôle Nagios pour la supervision des différentes machines
## Tables des matières
1. [Que fait le rôle Zabbix ?]
## Que fait le rôle Nagios ?
Il permet de configurer les agents zabbix en active.
### Installation et configuration de Zabbix-agent
Le rôle Zabbix-cli va installer zabbix-agent pour les serveurs, zabbix-agent pour superviser, zabbix-agent sera notre outil de supervision côté serveurs.

View File

@ -0,0 +1,12 @@
- name: config
template:
src: zabbix_agentd.conf.temp
dest: /etc/zabbix/zabbix_agentd.conf
vars:
PidFile: /run/zabbix/zabbix_agentd.pid
LogFile: /var/log/zabbix/zabbix_agentd.log
LogFileSize: 0
Server: 127.0.0.1
ServerActive: 192.168.99.106
Hostname: "{{ ansible_hostname }}"
Include: /etc/zabbix/zabbix_agentd.d/*.conf

View File

@ -0,0 +1,29 @@
- name: Intallation 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/zabbix-release_6.4-1+debian12_all.deb"
- name: Intallation 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: Intallation Zabbix agent
apt:
name: zabbix-agent
state: present
- name: Enable Zabbix agent service
systemd:
name: zabbix-agent
enabled: yes
- name: Rm package
file:
path: "/tmp/zabbix-release_6.4-1+debian12_all.deb"
state: absent

View File

@ -0,0 +1,7 @@
PidFile={{ PidFile }}
LogFile={{ LogFile }}
LogFileSize={{ LogFileSize }}
Server={{ Server }}
ServerActive={{ ServerActive }}
Hostname={{ Hostname }}
Include={{ Include }}

View File

@ -8,7 +8,7 @@
- dnsmasq
- squid
# - local-store
- snmp-agent
- zabbix-cli
## - syslog-cli
- post
# - goss

View File

@ -8,7 +8,7 @@
- appli
- ssh-cli
# - syslog-cli
- snmp-agent
- zabbix-cli
- ssl-apache
- post

View File

@ -6,7 +6,7 @@
- base
- goss
# - proxy3
- snmp-agent
- zabbix-cli
# - ssh-cli
# - syslog-cli
- smb-backup

View File

@ -7,7 +7,7 @@
- goss
- dns-master
- webautoconf
- snmp-agent
- zabbix-cli
- journald-snd
- ssh-cli
- post

View File

@ -13,7 +13,7 @@
roles:
- base
- goss
- snmp-agent
- zabbix-cli
- glpi
- ssh-cli
# - syslog-cli

View File

@ -6,7 +6,7 @@
- base
- goss
- squid
- snmp-agent
- zabbix-cli
- ssh-cli
# - syslog-cli
- post