This commit is contained in:
jaydee
2023-12-05 12:21:17 +01:00
parent 1e7ab9d975
commit 9a203c242e
5 changed files with 46 additions and 5 deletions

View File

@ -59,7 +59,17 @@
path: /etc/zabbix/zabbix_agent2.conf
regexp: "^Hostname=.*"
line: "Hostname={{ansible_hostname}}"
- name: Reconfigure zabbix-agent2 hostname
ansible.builtin.lineinfile:
path: /etc/zabbix/zabbix_agent2.conf
regexp: "^UserParameter=.*"
insertafter: '^# UserParameter='
line: "UserParameter=system.temperature,vcgencmd measure_temp"
- name: Add the user 'james' with a bash shell, appending the group 'admins' and 'developers' to the user's groups
ansible.builtin.user:
name: zabbix
groups: video
append: yes
- name: Restart zabbix-agent2 service
ansible.builtin.service:
name: zabbix-agent2.service