From 49d90fff094a8f290628dc89f2bfb17b03c64f6f Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 20 Jun 2019 17:29:23 +0200 Subject: [PATCH] apache: add a variable to customize the server-status host --- CHANGELOG.md | 1 + apache/defaults/main.yml | 2 ++ apache/tasks/server_status.yml | 5 +++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dce1ae48..560dc89d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The **patch** part changes incrementally at each release. ### Added * apache: add server status suffix in VHost (and default site) if missing +* apache: add a variable to customize the server-status host * apt: add a script to manage packages with "hold" mark * etc-git: gitignore /etc/letsencrypt/.certbot.lock * evomaintenance: make hooks configurable diff --git a/apache/defaults/main.yml b/apache/defaults/main.yml index ffc74b4e..15ff1a53 100644 --- a/apache/defaults/main.yml +++ b/apache/defaults/main.yml @@ -19,3 +19,5 @@ apache_munin_include: True general_alert_email: "root@localhost" log2mail_alert_email: Null + +apache_serverstatus_host: 127.0.0.1 diff --git a/apache/tasks/server_status.yml b/apache/tasks/server_status.yml index 6497966b..1d6cd8df 100644 --- a/apache/tasks/server_status.yml +++ b/apache/tasks/server_status.yml @@ -62,7 +62,8 @@ - name: apache-status URL is configured for Munin lineinfile: dest: /etc/munin/plugin-conf.d/munin-node - line: "env.url http://127.0.0.1/server-status-{{ apache_serverstatus_suffix }}?auto" - regexp: "env.url http://127.0.0.1/server-status" + line: "env.url http://{{ apache_serverstatus_host }}/server-status-{{ apache_serverstatus_suffix }}?auto" + regexp: 'env.url http://[^\\/]+/server-status' insertafter: "[apache_*]" create: no + notify: restart munin-node