From d4b979bd83adbc33b24f787743688bbc30ffa5e7 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Thu, 20 Nov 2025 16:24:51 -0700 Subject: [PATCH] Fix regexp that disables the default NAGIOS host (localhost). --- README.org | 2 +- roles_t/core/tasks/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index d053a47..52fa8f4 100644 --- a/README.org +++ b/README.org @@ -3761,7 +3761,7 @@ Core and Campus (and thus Gate) machines. line: "{{ item.line }}" backrefs: yes loop: - - { regexp: "^( *cfg_file *= *localhost.cfg)", line: "# \\1" } + - { regexp: "^( *cfg_file *=.*/localhost.cfg)", line: "#\\1" } - { regexp: "^( *admin_email *= *)", line: "\\1{{ ansible_user }}@localhost" } notify: Reload NAGIOS4. diff --git a/roles_t/core/tasks/main.yml b/roles_t/core/tasks/main.yml index 93c466d..096092c 100644 --- a/roles_t/core/tasks/main.yml +++ b/roles_t/core/tasks/main.yml @@ -692,7 +692,7 @@ line: "{{ item.line }}" backrefs: yes loop: - - { regexp: "^( *cfg_file *= *localhost.cfg)", line: "# \\1" } + - { regexp: "^( *cfg_file *=.*/localhost.cfg)", line: "#\\1" } - { regexp: "^( *admin_email *= *)", line: "\\1{{ ansible_user }}@localhost" } notify: Reload NAGIOS4. -- 2.25.1