added play for LISTENIP entry in config
This commit is contained in:
@@ -2,4 +2,3 @@
|
||||
zabbix_server: "zabbix.lan"
|
||||
zabbix_version: "7.0"
|
||||
zabbix_release: "7.0-2"
|
||||
zabbix_ubuntu_version: "24.04"
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
---
|
||||
- name: Get Ubuntu codename
|
||||
ansible.builtin.command: lsb_release -cs
|
||||
register: ubuntu_codename
|
||||
changed_when: false
|
||||
|
||||
- name: Download Zabbix repository package
|
||||
ansible.builtin.get_url:
|
||||
url: "https://repo.zabbix.com/zabbix/{{ zabbix_version }}/ubuntu/pool/main/z/zabbix-release/zabbix-release_{{ zabbix_release }}+ubuntu{{ zabbix_ubuntu_version }}_all.deb"
|
||||
url: "https://repo.zabbix.com/zabbix/{{ zabbix_version }}/ubuntu/pool/main/z/zabbix-release/zabbix-release_{{ zabbix_release }}+ubuntu{{ ansible_distribution_version }}_all.deb"
|
||||
dest: /tmp/zabbix-release.deb
|
||||
mode: '0644'
|
||||
|
||||
@@ -38,6 +33,12 @@
|
||||
regexp: '^Hostname='
|
||||
line: "Hostname={{ ansible_hostname }}"
|
||||
|
||||
- name: Configure Zabbix agent listen IP
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/zabbix/zabbix_agent2.conf
|
||||
regexp: '^#?ListenIP='
|
||||
line: "ListenIP=127.0.0.1"
|
||||
|
||||
- name: Enable and start Zabbix agent2
|
||||
ansible.builtin.systemd:
|
||||
name: zabbix-agent2
|
||||
|
||||
Reference in New Issue
Block a user