From bc2fc0dc6e8963fe9bbe5ff59608f15b0e23829f Mon Sep 17 00:00:00 2001 From: Rene Mewissen Date: Tue, 18 Jul 2023 09:56:28 +0200 Subject: [PATCH] removed insertafter and corrected syntax --- roles/server/tasks/utilities/snmpd.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/roles/server/tasks/utilities/snmpd.yml b/roles/server/tasks/utilities/snmpd.yml index d945336..2a816f5 100644 --- a/roles/server/tasks/utilities/snmpd.yml +++ b/roles/server/tasks/utilities/snmpd.yml @@ -59,18 +59,16 @@ - name: server | snmpd | set sysLocation lineinfile: path: "{{ snmpd_conf }}" - line: "^sysLocation.*$" + regexp: '^sysLocation.*$' state: present line: "sysLocation {{ snmp_location }}" - insertafter: "# SECTION: System Information Setup" - name: server | snmpd | set sysContact lineinfile: path: "{{ snmpd_conf }}" - line: "^sysContact.*$" + regexp: '^sysContact.*$' state: present line: "sysContact {{ snmp_contact }}" - insertafter: "# SECTION: System Information Setup" - name: server | snmpd | enable service on all interfaces lineinfile: