+Public first commit
This commit is contained in:
58
README.md
Normal file
58
README.md
Normal file
@@ -0,0 +1,58 @@
|
||||
Zabbix Agent ansible role
|
||||
=========
|
||||
|
||||
This role can be used to deploy Zabbix agents via Ansible automation tool
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
This role is only for Debian distributions. It will install 4.4 version of Zabbix agents from Zabbix official repo.\
|
||||
To use TLS encryption with Auto-Registration, your server needs to be on 4.4 version as well.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
Each variable is set with a default value in 'defaults/main.conf'. You could change the file or overide them when calling the role.
|
||||
|
||||
- zabbix_server: "zabbix.example.net"\
|
||||
FQDN or IP address of Zabbix server. This variable is used to set 'ServerActive' parameter, so use only one FQDN/IP.
|
||||
|
||||
- zabbix_proxies: "127.0.0.1"\
|
||||
Comma separated list of proxies or other hosts which should be able to poll passive Zabbix agent. It is used to set the 'Server' parameter along with the 'zabbix_server' variable.
|
||||
|
||||
- zabbix_psk: False\
|
||||
PSK for TLS encryption. If set to 'False', TLS parameters won't be set in Zabbix agent configuration file.
|
||||
|
||||
- zabbix_psk_id: "PSKAR"\
|
||||
PSK Identity for TLS encryption. See how to configure Auto-Registration with TLS here [#zabbix-auto-registration-with-tls]
|
||||
|
||||
Zabbix Auto-Registration with TLS
|
||||
---------------------------------
|
||||
|
||||
In Zabbix Web interface, go to 'Administration/General/Auto-Registration' ($ZABBIX_SERVER_URL/zabbix.php?action=autoreg.edit).\
|
||||
|
||||
Check the PSK option and fill the two field with your PSK Identity and PSK and save.
|
||||

|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Here is an example of how to use this role in a playbook:
|
||||
|
||||
- hosts: servers
|
||||
gather_facts: yes
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
roles:
|
||||
- { role: zabbix-agent, tags: zabbix } # when not using TLS
|
||||
- { role: zabbix-agent, tags: zabbix, zabbix_psk_id: PSKAR, zabbix_psk: jdkjnckdsjncdskncsdkcldsoijds } # when using TLS
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
"THE BEER-WARE LICENSE" (Revision 42):
|
||||
|
||||
PMJ wrote this file. As long as you retain this notice you can
|
||||
do whatever you want with this stuff. If we meet some day, and you think this
|
||||
stuff is worth it, you can buy me a beer in return. PMJ
|
||||
Reference in New Issue
Block a user