This commit is contained in:
Tomislav Kopić 2024-02-10 13:06:07 +01:00
parent 77b6b71ad5
commit 615ab45238
2 changed files with 7 additions and 3 deletions

View File

@ -8,11 +8,13 @@
upgrade: dist
cache_valid_time: 3600
force_apt_get: true
- name: "Clean unwanted olderstuff"
apt:
autoremove: yes
purge: yes
clean: yes
- name: "Fix sysctl file"
ansible.builtin.copy:
src: ../config/sysctl.conf
@ -20,5 +22,6 @@
owner: "root"
group: "root"
mode: 0644
- name: "Reboot all machines"
ansible.builtin.reboot:

View File

@ -25,8 +25,6 @@
name: zabbix-agent2
state: latest
- ansible.builtin.copy: content="{{ psk_key }}" dest=/etc/zabbix/key.psk
- name: Configure zabbix agent service
ansible.builtin.template:
src: ../templates/zabbix_agentd2.j2
@ -35,13 +33,16 @@
group: zabbix
mode: '0644'
backup: yes
ansible.builtin.copy:
content: "{{ psk_key }}"
dest: /etc/zabbix/key.psk
- name: Create a config directory
ansible.builtin.file:
path: /etc/zabbix/zabbix_agentd.conf.d/
state: directory
mode: '0755'
- name: Restart zabbix agent
ansible.builtin.service:
name: zabbix-agent2