zabbix agent library file and test with promgraph
This commit is contained in:
@@ -19,6 +19,9 @@
|
|||||||
- name: Setup Restic Cron jobs
|
- name: Setup Restic Cron jobs
|
||||||
include: ../../lib/setup-restic-cron.yml
|
include: ../../lib/setup-restic-cron.yml
|
||||||
|
|
||||||
|
- name: Setup Zabbix Agent
|
||||||
|
include: ../../lib/setup-zabbix-agent.yml
|
||||||
|
|
||||||
- name: Create grail user
|
- name: Create grail user
|
||||||
user:
|
user:
|
||||||
name: promgraf
|
name: promgraf
|
||||||
|
|||||||
27
roles/lib/setup-zabbix-agent.yml
Normal file
27
roles/lib/setup-zabbix-agent.yml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
- name: Download Zabbix Repo
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: "wget https://repo.zabbix.com/zabbix/7.2/release/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.2+debian12_all.deb"
|
||||||
|
dest: "/tmp/zabbix-release_7.2.deb"
|
||||||
|
|
||||||
|
- name: Install Zabbix Repo package
|
||||||
|
apt:
|
||||||
|
deb: /tmp/zabbix-release_7.2.deb
|
||||||
|
|
||||||
|
- name: Install zabbix-agent2 and plugins
|
||||||
|
become: yes
|
||||||
|
update_cache: yes
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name:
|
||||||
|
- zabbix-agent2
|
||||||
|
- zabbix-agent2-plugin-*
|
||||||
|
|
||||||
|
- name: Restart zabbix-agent2
|
||||||
|
systemd:
|
||||||
|
name: zabbix-agent2
|
||||||
|
state: restarted
|
||||||
|
|
||||||
|
- name: Enable zabbix-agent2 to start on boot
|
||||||
|
systemd:
|
||||||
|
name: zabbix-agent2
|
||||||
|
enabled: yes
|
||||||
Reference in New Issue
Block a user