diff --git a/playbooks/00_install_zabbix_agent.yml b/playbooks/00_install_zabbix_agent.yml index 5db702d..31eeaf4 100644 --- a/playbooks/00_install_zabbix_agent.yml +++ b/playbooks/00_install_zabbix_agent.yml @@ -122,6 +122,13 @@ regexp: "^HostMetadata=.*" insertafter: '^# HostMetadata=' line: "HostMetadata=linux;jaydee" + - name: Reconfigure zabbix-agent2 hostname + ansible.builtin.lineinfile: + path: "{{ zabbix_agent_cfg }}" + regexp: "^HostMetadata=.*" + insertafter: '^# HostMetadata=' + line: "HostMetadata=server;jaydee" + when: inventory_hostname == 'nas.home.lan' or inventory_hostname == 'm-server.home.lan' - name: Add the user 'to group video ansible.builtin.user: