This commit is contained in:
2026-02-17 14:23:26 +01:00
parent e72b34da27
commit aa3578e8d1
4 changed files with 29 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
zabbix_api_url: "https://zabbix.sectorq.eu/api_jsonrpc.php"
dnf_proxy_host: "192.168.77.101"
dnf_proxy_port: "3128"
zabbix_user: jd

View File

@@ -1,4 +1,4 @@
- name: Install Zabbix Proxy on Debian 13
- name: Install Zabbix Proxy on AlmaLinux 10
vars:
zabbix_version: "7.4"
zabbix_server_ip: "192.168.77.101"
@@ -20,6 +20,14 @@
set_fact:
clustename: "alma10"
- name: Allow user to start/stop zabbix-proxy with sudo without password
ansible.builtin.copy:
dest: "/etc/sudoers.d/{{ zabbix_user }}-zabbix-proxy"
content: "{{ zabbix_user }} ALL=(ALL) NOPASSWD: /bin/systemctl start zabbix-proxy, /bin/systemctl stop zabbix-proxy"
owner: root
group: root
mode: '0440'
- name: Configure global DNF proxy
ansible.builtin.lineinfile:
path: /etc/dnf/dnf.conf

View File

@@ -17,6 +17,15 @@
- name: Set proxy name
set_fact:
clustename: "debian13"
- name: Allow user to start/stop zabbix-proxy with sudo without password
ansible.builtin.copy:
dest: "/etc/sudoers.d/{{ zabbix_user }}-zabbix-proxy"
content: "{{ zabbix_user }} ALL=(ALL) NOPASSWD: /bin/systemctl start zabbix-proxy, /bin/systemctl stop zabbix-proxy"
owner: root
group: root
mode: '0440'
- name: Show default IP
ansible.builtin.debug:

View File

@@ -20,6 +20,15 @@
set_fact:
clustename: "rocky9"
- name: Allow user to start/stop zabbix-proxy with sudo without password
ansible.builtin.copy:
dest: "/etc/sudoers.d/{{ zabbix_user }}-zabbix-proxy"
content: "{{ zabbix_user }} ALL=(ALL) NOPASSWD: /bin/systemctl start zabbix-proxy, /bin/systemctl stop zabbix-proxy"
owner: root
group: root
mode: '0440'
- name: Configure global DNF proxy
ansible.builtin.lineinfile:
path: /etc/dnf/dnf.conf