From: Matt Birkholz Date: Thu, 20 Nov 2025 23:24:51 +0000 (-0700) Subject: Fix regexp that disables the default NAGIOS host (localhost). X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=d4b979bd83adbc33b24f787743688bbc30ffa5e7;p=Institute.git Fix regexp that disables the default NAGIOS host (localhost). --- 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.