Fix regexp that disables the default NAGIOS host (localhost).
authorMatt Birkholz <matt@birchwood-abbey.net>
Thu, 20 Nov 2025 23:24:51 +0000 (16:24 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Thu, 20 Nov 2025 23:24:51 +0000 (16:24 -0700)
README.org
roles_t/core/tasks/main.yml

index d053a47fc20f4a5360b28ced5a89c46d15c3e0e1..52fa8f43ab985b59a53cf423a739f669e5c7cd73 100644 (file)
@@ -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.
index 93c466deb5077a95ce773d485033a37c0196b514..096092ceee3106fa02bf4bcd3941a92ba519f9fc 100644 (file)
     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.