From 83a36574887436c9b3a5c4d2b757ff52fb805a2f Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:01:49 +0200 Subject: [PATCH 01/47] d --- group_vars/munin.yml | 2 +- roles/mgrote_munin_server/tasks/main.yml | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/group_vars/munin.yml b/group_vars/munin.yml index 83388801..6fbfc29d 100644 --- a/group_vars/munin.yml +++ b/group_vars/munin.yml @@ -42,7 +42,7 @@ munin_node_bind_port: "4949" munin_node_allowed_cidrs: [127.0.0.1] ### mgrote_munin_master -munin_mode: cron # or cgi +munin_mode: cgi # or cron munin_mail_user: munin@mgrote.net munin_mail_server: "{{ postfix_smtp_server }}" munin_mail_port: "{{ 1025 }}" diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 0ae1e90a..5577990a 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -12,7 +12,27 @@ mode: '0755' owner: munin group: munin - loop: "{{ munin_dirs }}" + loop: + - name: /var/run/munin + mode: '0755' + owner: root + group: root + - name: /etc/munin/plugins + mode: '0755' + owner: root + group: root + - name: /var/cache/munin/www + mode: '0755' + owner: root + group: root + - name: /var/lib/munin + mode: '0755' + owner: root + group: root + - name: /var/cache/munin + mode: '0755' + owner: root + group: root - name: Ensure permissions are set ansible.builtin.file: -- 2.34.1 From e7861a3bf25b091312b7c4444b4d4c322ef58dfd Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:03:34 +0200 Subject: [PATCH 02/47] dd --- roles/mgrote_munin_server/defaults/main.yml | 6 ----- roles/mgrote_munin_server/tasks/main.yml | 28 ++++++++++----------- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/roles/mgrote_munin_server/defaults/main.yml b/roles/mgrote_munin_server/defaults/main.yml index 494f7465..aea18e28 100644 --- a/roles/mgrote_munin_server/defaults/main.yml +++ b/roles/mgrote_munin_server/defaults/main.yml @@ -14,12 +14,6 @@ munin_packages: - s-nail - libfile-readbackwards-perl munin_servername: "{{ ansible_fqdn }}.mgrote.net" -munin_dirs: - - /var/run/munin - - /etc/munin/plugins - - /var/cache/munin/www - - /var/lib/munin - - /var/cache/munin munin_server_plugins: - munin_stats - munin_update diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 5577990a..bb15dd4f 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -7,32 +7,32 @@ - name: Ensure needed dirs exists ansible.builtin.file: - path: "{{ item }}" + path: "{{ item.name }}" state: directory - mode: '0755' - owner: munin - group: munin + mode: "{{ item.mode }}" + owner: "{{ item.owner }}" + group: "{{ item.group }}" loop: - name: /var/run/munin mode: '0755' - owner: root - group: root + owner: munin + group: munin - name: /etc/munin/plugins mode: '0755' - owner: root - group: root + owner: munin + group: munin - name: /var/cache/munin/www mode: '0755' - owner: root - group: root + owner: munin + group: munin - name: /var/lib/munin mode: '0755' - owner: root - group: root + owner: munin + group: munin - name: /var/cache/munin mode: '0755' - owner: root - group: root + owner: munin + group: munin - name: Ensure permissions are set ansible.builtin.file: -- 2.34.1 From 42e64c9deb4cf8f62669d428dc0bae6968d72704 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:04:05 +0200 Subject: [PATCH 03/47] f --- roles/mgrote_munin_server/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index bb15dd4f..9d314463 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -31,8 +31,8 @@ group: munin - name: /var/cache/munin mode: '0755' - owner: munin - group: munin + owner: root + group: root - name: Ensure permissions are set ansible.builtin.file: -- 2.34.1 From f6282ab5720c646a7e32c63d77e2e360886cf9dc Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:05:38 +0200 Subject: [PATCH 04/47] dd --- roles/mgrote_munin_server/tasks/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 9d314463..03a8e4eb 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -33,6 +33,10 @@ mode: '0755' owner: root group: root + - name: + mode: 'ugo+rw' + owner: munin + group: munin - name: Ensure permissions are set ansible.builtin.file: -- 2.34.1 From 5e93b5236afb075ed866f1cb7954f10185b77404 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:06:42 +0200 Subject: [PATCH 05/47] ff --- roles/mgrote_munin_server/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 03a8e4eb..ecec77ca 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -33,7 +33,7 @@ mode: '0755' owner: root group: root - - name: + - name: /var/lib/munin/cgi-tmp mode: 'ugo+rw' owner: munin group: munin -- 2.34.1 From 2564eb287390acad8e6fe1f762bd0b4d3dcd8fea Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:11:45 +0200 Subject: [PATCH 06/47] ff --- roles/mgrote_munin_server/tasks/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index ecec77ca..4ebb6994 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -23,8 +23,8 @@ group: munin - name: /var/cache/munin/www mode: '0755' - owner: munin - group: munin + owner: root + group: root - name: /var/lib/munin mode: '0755' owner: munin @@ -34,14 +34,14 @@ owner: root group: root - name: /var/lib/munin/cgi-tmp - mode: 'ugo+rw' - owner: munin - group: munin + mode: '0755' + owner: root + group: root - name: Ensure permissions are set ansible.builtin.file: path: /var/lib/munin/cgi-tmp - mode: 'ugo+rw' + mode: '0755' state: directory owner: munin group: munin -- 2.34.1 From 7f5b74f22b3e5a9d80e2a039c8367e04682fd032 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:12:26 +0200 Subject: [PATCH 07/47] d --- roles/mgrote_munin_server/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 4ebb6994..e5e588da 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -23,8 +23,8 @@ group: munin - name: /var/cache/munin/www mode: '0755' - owner: root - group: root + owner: tss + group: tss - name: /var/lib/munin mode: '0755' owner: munin @@ -44,7 +44,7 @@ mode: '0755' state: directory owner: munin - group: munin + group: tss recurse: true - name: Template apache config @@ -56,7 +56,7 @@ group: root notify: "restart apache2" -- name: Enable fgcid +- name: apache2: enable fgcid community.general.apache2_module: state: present name: fcgid -- 2.34.1 From 5040edd9ffd75ad6f03784b2c30df9e86a6fe3b0 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:12:43 +0200 Subject: [PATCH 08/47] ff --- roles/mgrote_munin_server/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index e5e588da..c9affcca 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -56,7 +56,7 @@ group: root notify: "restart apache2" -- name: apache2: enable fgcid +- name: "apache2: enable fgcid" community.general.apache2_module: state: present name: fcgid -- 2.34.1 From 064c8289a0679b06825857601e98828586d838aa Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:13:31 +0200 Subject: [PATCH 09/47] ff --- roles/mgrote_munin_server/tasks/main.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index c9affcca..82df67c9 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -23,7 +23,7 @@ group: munin - name: /var/cache/munin/www mode: '0755' - owner: tss + owner: root group: tss - name: /var/lib/munin mode: '0755' @@ -33,10 +33,6 @@ mode: '0755' owner: root group: root - - name: /var/lib/munin/cgi-tmp - mode: '0755' - owner: root - group: root - name: Ensure permissions are set ansible.builtin.file: -- 2.34.1 From 8268f8263c29dda87eab211c1ccbb1a972f588f8 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:14:19 +0200 Subject: [PATCH 10/47] f --- roles/mgrote_munin_server/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 82df67c9..8e3493eb 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -39,8 +39,8 @@ path: /var/lib/munin/cgi-tmp mode: '0755' state: directory - owner: munin - group: tss + owner: root # 116 + group: root # 116 recurse: true - name: Template apache config -- 2.34.1 From 8b766e045201dce3e8958114190b75f7b44058c9 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:14:51 +0200 Subject: [PATCH 11/47] dd --- roles/mgrote_munin_server/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 8e3493eb..0c7f58f6 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -23,8 +23,8 @@ group: munin - name: /var/cache/munin/www mode: '0755' - owner: root - group: tss + owner: tss + group: root - name: /var/lib/munin mode: '0755' owner: munin -- 2.34.1 From 348827d7245caf56818a6145025c04546ae417de Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:15:29 +0200 Subject: [PATCH 12/47] f --- roles/mgrote_munin_server/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 0c7f58f6..aa3cc8cd 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -23,7 +23,7 @@ group: munin - name: /var/cache/munin/www mode: '0755' - owner: tss + owner: lxd group: root - name: /var/lib/munin mode: '0755' -- 2.34.1 From 03f1fb24c5d80fd4d1ade7d0430d65ebd255f6ec Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:15:57 +0200 Subject: [PATCH 13/47] f --- roles/mgrote_munin_server/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index aa3cc8cd..0c7f58f6 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -23,7 +23,7 @@ group: munin - name: /var/cache/munin/www mode: '0755' - owner: lxd + owner: tss group: root - name: /var/lib/munin mode: '0755' -- 2.34.1 From bc80d455438d77892c209fbf0eb329b91e140a4b Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:20:10 +0200 Subject: [PATCH 14/47] dd --- roles/mgrote_munin_server/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 0c7f58f6..eaa91aa3 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -37,10 +37,10 @@ - name: Ensure permissions are set ansible.builtin.file: path: /var/lib/munin/cgi-tmp - mode: '0755' + mode: '0777' state: directory - owner: root # 116 - group: root # 116 + owner: munin + group: munin recurse: true - name: Template apache config -- 2.34.1 From d973a0805893bcd335db503666b0ac24cb9853d0 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:34:23 +0200 Subject: [PATCH 15/47] d --- roles/mgrote_munin_server/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index eaa91aa3..e2518df6 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -23,7 +23,7 @@ group: munin - name: /var/cache/munin/www mode: '0755' - owner: tss + owner: www-data group: root - name: /var/lib/munin mode: '0755' @@ -40,7 +40,7 @@ mode: '0777' state: directory owner: munin - group: munin + group: www-data recurse: true - name: Template apache config -- 2.34.1 From 1475f62d6b6701014d48c11b51d9186ec67be1fd Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:35:02 +0200 Subject: [PATCH 16/47] d --- roles/mgrote_munin_server/tasks/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index e2518df6..f8dc56df 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -56,6 +56,7 @@ community.general.apache2_module: state: present name: fcgid + notify: "restart apache2" - name: Template munin-server plugins ansible.builtin.template: @@ -81,6 +82,7 @@ line: "*/5 * * * * munin if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi" create: true mode: '0644' + notify: "restart munin" - name: check if munin has been run ansible.builtin.stat: -- 2.34.1 From af75248af66e028a71f9bd804201e8573c2f5ef6 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 19:57:53 +0200 Subject: [PATCH 17/47] gg --- .../mgrote_munin_server/templates/apache.conf | 51 ++++++++++++------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/roles/mgrote_munin_server/templates/apache.conf b/roles/mgrote_munin_server/templates/apache.conf index 4d21bc08..1e1d404a 100644 --- a/roles/mgrote_munin_server/templates/apache.conf +++ b/roles/mgrote_munin_server/templates/apache.conf @@ -1,24 +1,41 @@ ServerName {{ munin_servername }} + ServerAlias munin - # Redirect requests without /munin to /munin - RedirectMatch ^/$ /munin/ + ServerAdmin info@example.org - # Existing configuration for serving /munin - Alias /munin /var/cache/munin/www - - Require all granted - Options None - + DocumentRoot /var/www + + # Rewrite rules to serve traffic from the root instead of /munin-cgi + RewriteEngine On + # Static files + RewriteRule ^/favicon.ico /var/cache/munin/www/static/favicon.ico [L] + RewriteRule ^/static/(.*) /var/cache/munin/www/static/$1 [L] + # HTML + RewriteRule ^(/.*\.html)?$ /munin-cgi/munin-cgi-html/$1 [PT] + # Images + RewriteRule ^/munin-cgi/munin-cgi-graph/(.*) /$1 + RewriteCond %{REQUEST_URI} !^/static + RewriteRule ^/(.*.png)$ /munin-cgi/munin-cgi-graph/$1 [L,PT] ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph - - Require all granted - - SetHandler fcgid-script - - - SetHandler cgi-script - - + ScriptAlias /munin-cgi/munin-cgi-html /usr/lib/munin/cgi/munin-cgi-html + + + Require all granted + + + + Require all granted + + SetHandler fcgid-script + + + SetHandler cgi-script + + + + CustomLog /var/log/apache2/munin.example.org-access.log combined + ErrorLog /var/log/apache2/munin.example.org-error.log +# http://guide.munin-monitoring.org/en/latest/example/webserver/apache-cgi.html -- 2.34.1 From faec2d72c8a3186bc0ffd4b7d91e20a594ebe0c7 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 19:59:04 +0200 Subject: [PATCH 18/47] ff --- roles/mgrote_munin_server/tasks/main.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index f8dc56df..21feefc9 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -52,11 +52,14 @@ group: root notify: "restart apache2" -- name: "apache2: enable fgcid" +- name: "apache2: enable modules" community.general.apache2_module: state: present - name: fcgid + name: "{{ item }}" notify: "restart apache2" + loop: + - fcgid + - rewrite - name: Template munin-server plugins ansible.builtin.template: -- 2.34.1 From 81583da76465c9c4e433a9ec99f255637648dc72 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 19:59:14 +0200 Subject: [PATCH 19/47] ff --- roles/mgrote_munin_server/templates/apache.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/templates/apache.conf b/roles/mgrote_munin_server/templates/apache.conf index 1e1d404a..8e06f322 100644 --- a/roles/mgrote_munin_server/templates/apache.conf +++ b/roles/mgrote_munin_server/templates/apache.conf @@ -38,4 +38,4 @@ CustomLog /var/log/apache2/munin.example.org-access.log combined ErrorLog /var/log/apache2/munin.example.org-error.log -# http://guide.munin-monitoring.org/en/latest/example/webserver/apache-cgi.html +# http://guide.munin-monitoring.org/en/latest/example/webserver/apache-cgi.html -- 2.34.1 From f993a4e5150a0ff0c1ee70a7710f6597046b0467 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:03:43 +0200 Subject: [PATCH 20/47] dd --- roles/mgrote_munin_server/tasks/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 21feefc9..6f6f2091 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -17,13 +17,17 @@ mode: '0755' owner: munin group: munin + - name: /var/lib/munin-node/plugin-state + mode: '0775' + owner: munin + group: munin - name: /etc/munin/plugins mode: '0755' owner: munin group: munin - name: /var/cache/munin/www mode: '0755' - owner: www-data + owner: munin group: root - name: /var/lib/munin mode: '0755' -- 2.34.1 From 48e6aa01fad71a4edd07e3e49542e0f762323da4 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:05:07 +0200 Subject: [PATCH 21/47] Revert "ff" This reverts commit 81583da76465c9c4e433a9ec99f255637648dc72. --- roles/mgrote_munin_server/templates/apache.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/templates/apache.conf b/roles/mgrote_munin_server/templates/apache.conf index 8e06f322..1e1d404a 100644 --- a/roles/mgrote_munin_server/templates/apache.conf +++ b/roles/mgrote_munin_server/templates/apache.conf @@ -38,4 +38,4 @@ CustomLog /var/log/apache2/munin.example.org-access.log combined ErrorLog /var/log/apache2/munin.example.org-error.log -# http://guide.munin-monitoring.org/en/latest/example/webserver/apache-cgi.html +# http://guide.munin-monitoring.org/en/latest/example/webserver/apache-cgi.html -- 2.34.1 From 7d4814f7afa529f89f77954c9914b064641a55ad Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:05:27 +0200 Subject: [PATCH 22/47] Revert "gg" This reverts commit af75248af66e028a71f9bd804201e8573c2f5ef6. --- .../mgrote_munin_server/templates/apache.conf | 51 +++++++------------ 1 file changed, 17 insertions(+), 34 deletions(-) diff --git a/roles/mgrote_munin_server/templates/apache.conf b/roles/mgrote_munin_server/templates/apache.conf index 1e1d404a..4d21bc08 100644 --- a/roles/mgrote_munin_server/templates/apache.conf +++ b/roles/mgrote_munin_server/templates/apache.conf @@ -1,41 +1,24 @@ ServerName {{ munin_servername }} - ServerAlias munin - ServerAdmin info@example.org + # Redirect requests without /munin to /munin + RedirectMatch ^/$ /munin/ - DocumentRoot /var/www - - # Rewrite rules to serve traffic from the root instead of /munin-cgi - RewriteEngine On - # Static files - RewriteRule ^/favicon.ico /var/cache/munin/www/static/favicon.ico [L] - RewriteRule ^/static/(.*) /var/cache/munin/www/static/$1 [L] - # HTML - RewriteRule ^(/.*\.html)?$ /munin-cgi/munin-cgi-html/$1 [PT] - # Images - RewriteRule ^/munin-cgi/munin-cgi-graph/(.*) /$1 - RewriteCond %{REQUEST_URI} !^/static - RewriteRule ^/(.*.png)$ /munin-cgi/munin-cgi-graph/$1 [L,PT] + # Existing configuration for serving /munin + Alias /munin /var/cache/munin/www + + Require all granted + Options None + ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph - ScriptAlias /munin-cgi/munin-cgi-html /usr/lib/munin/cgi/munin-cgi-html - - - Require all granted - - - - Require all granted - - SetHandler fcgid-script - - - SetHandler cgi-script - - - - CustomLog /var/log/apache2/munin.example.org-access.log combined - ErrorLog /var/log/apache2/munin.example.org-error.log + + Require all granted + + SetHandler fcgid-script + + + SetHandler cgi-script + + -# http://guide.munin-monitoring.org/en/latest/example/webserver/apache-cgi.html -- 2.34.1 From 1698429fa2a0ee1818faf6f8361027b0214c1948 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:05:54 +0200 Subject: [PATCH 23/47] Revert "ff" This reverts commit faec2d72c8a3186bc0ffd4b7d91e20a594ebe0c7. --- roles/mgrote_munin_server/tasks/main.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 6f6f2091..7b49fb3f 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -56,14 +56,11 @@ group: root notify: "restart apache2" -- name: "apache2: enable modules" +- name: "apache2: enable fgcid" community.general.apache2_module: state: present - name: "{{ item }}" + name: fcgid notify: "restart apache2" - loop: - - fcgid - - rewrite - name: Template munin-server plugins ansible.builtin.template: -- 2.34.1 From aae4250099d385cfd4dc3a2da50d837036d6038e Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:18:49 +0200 Subject: [PATCH 24/47] ff --- roles/mgrote_munin_server/templates/apache.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/templates/apache.conf b/roles/mgrote_munin_server/templates/apache.conf index 4d21bc08..b0b5dada 100644 --- a/roles/mgrote_munin_server/templates/apache.conf +++ b/roles/mgrote_munin_server/templates/apache.conf @@ -2,7 +2,7 @@ ServerName {{ munin_servername }} # Redirect requests without /munin to /munin - RedirectMatch ^/$ /munin/ + RedirectMatch ^/$ /munin-cgi/ # Existing configuration for serving /munin Alias /munin /var/cache/munin/www -- 2.34.1 From c27bc921167a1bcdd70e400e0b588e3648e4b761 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:22:14 +0200 Subject: [PATCH 25/47] g --- roles/mgrote_munin_server/templates/apache.conf | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/roles/mgrote_munin_server/templates/apache.conf b/roles/mgrote_munin_server/templates/apache.conf index b0b5dada..732bdc14 100644 --- a/roles/mgrote_munin_server/templates/apache.conf +++ b/roles/mgrote_munin_server/templates/apache.conf @@ -2,23 +2,20 @@ ServerName {{ munin_servername }} # Redirect requests without /munin to /munin - RedirectMatch ^/$ /munin-cgi/ + RedirectMatch ^/$ /munin/ # Existing configuration for serving /munin Alias /munin /var/cache/munin/www - Require all granted - Options None + Require all granted + Options None ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph - Require all granted - - SetHandler fcgid-script - - - SetHandler cgi-script - + Require all granted + + SetHandler fcgid-script + -- 2.34.1 From c230cb4c56a144ad5e8b218a681cfe06228217db Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:22:52 +0200 Subject: [PATCH 26/47] dd --- roles/mgrote_munin_server/templates/apache.conf | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/roles/mgrote_munin_server/templates/apache.conf b/roles/mgrote_munin_server/templates/apache.conf index 732bdc14..d4890a19 100644 --- a/roles/mgrote_munin_server/templates/apache.conf +++ b/roles/mgrote_munin_server/templates/apache.conf @@ -5,13 +5,11 @@ RedirectMatch ^/$ /munin/ # Existing configuration for serving /munin - Alias /munin /var/cache/munin/www - + Require all granted Options None - ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph Require all granted -- 2.34.1 From 848e2ea82bd28c2b80900b5aafbd828b3ba600cc Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:24:15 +0200 Subject: [PATCH 27/47] dd --- roles/mgrote_munin_server/templates/apache.conf | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/roles/mgrote_munin_server/templates/apache.conf b/roles/mgrote_munin_server/templates/apache.conf index d4890a19..baded428 100644 --- a/roles/mgrote_munin_server/templates/apache.conf +++ b/roles/mgrote_munin_server/templates/apache.conf @@ -1,19 +1,20 @@ ServerName {{ munin_servername }} - # Redirect requests without /munin to /munin - RedirectMatch ^/$ /munin/ + ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph + ScriptAlias /munin-cgi/munin-cgi-html /usr/lib/munin/cgi/munin-cgi-html - # Existing configuration for serving /munin Require all granted - Options None - + Require all granted SetHandler fcgid-script - + + SetHandler cgi-script + + -- 2.34.1 From babe3b3d48175b7c71b8ddec1cd01239eadce3d2 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:25:22 +0200 Subject: [PATCH 28/47] dd --- roles/mgrote_munin_server/templates/apache.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/mgrote_munin_server/templates/apache.conf b/roles/mgrote_munin_server/templates/apache.conf index baded428..3cd3b2f3 100644 --- a/roles/mgrote_munin_server/templates/apache.conf +++ b/roles/mgrote_munin_server/templates/apache.conf @@ -8,6 +8,10 @@ Require all granted + + Require all granted + + Require all granted -- 2.34.1 From f5c46dbd0dc40c54987058b0a0b312add8419c4e Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:26:51 +0200 Subject: [PATCH 29/47] dd --- roles/mgrote_munin_server/templates/apache.conf | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/roles/mgrote_munin_server/templates/apache.conf b/roles/mgrote_munin_server/templates/apache.conf index 3cd3b2f3..c883f2c0 100644 --- a/roles/mgrote_munin_server/templates/apache.conf +++ b/roles/mgrote_munin_server/templates/apache.conf @@ -1,6 +1,19 @@ ServerName {{ munin_servername }} + DocumentRoot /var/www + + # Rewrite rules to serve traffic from the root instead of /munin-cgi + RewriteEngine On + # Static files + RewriteRule ^/favicon.ico /var/cache/munin/www/static/favicon.ico [L] + RewriteRule ^/static/(.*) /var/cache/munin/www/static/$1 [L] + # HTML + RewriteRule ^(/.*\.html)?$ /munin-cgi/munin-cgi-html/$1 [PT] + # Images + RewriteRule ^/munin-cgi/munin-cgi-graph/(.*) /$1 + RewriteCond %{REQUEST_URI} !^/static + RewriteRule ^/(.*.png)$ /munin-cgi/munin-cgi-graph/$1 [L,PT] ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph ScriptAlias /munin-cgi/munin-cgi-html /usr/lib/munin/cgi/munin-cgi-html -- 2.34.1 From 31f8ad62c9817df476af8da0d61023c27f8e9147 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:28:17 +0200 Subject: [PATCH 30/47] dd --- roles/mgrote_munin_server/tasks/main.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 7b49fb3f..81bca4ea 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -56,7 +56,13 @@ group: root notify: "restart apache2" -- name: "apache2: enable fgcid" +- name: "apache2: enable rewrite" + community.general.apache2_module: + state: present + name: rewrite + notify: "restart apache2" + +- name: "apache2: enable rewrite" community.general.apache2_module: state: present name: fcgid -- 2.34.1 From f23a526d2a826deb2601b3fe6cddcc7a004e8005 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:30:13 +0200 Subject: [PATCH 31/47] d --- roles/mgrote_munin_server/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 81bca4ea..fbdaf95e 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -41,7 +41,7 @@ - name: Ensure permissions are set ansible.builtin.file: path: /var/lib/munin/cgi-tmp - mode: '0777' + mode: '0755' state: directory owner: munin group: www-data -- 2.34.1 From d71645de304d939a11ebef74eab7b5061a28e184 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:31:27 +0200 Subject: [PATCH 32/47] f --- roles/mgrote_munin_server/tasks/main.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index fbdaf95e..3b242247 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -37,15 +37,10 @@ mode: '0755' owner: root group: root - -- name: Ensure permissions are set - ansible.builtin.file: - path: /var/lib/munin/cgi-tmp - mode: '0755' - state: directory - owner: munin - group: www-data - recurse: true + - name: /var/lib/munin/cgi-tmp + mode: '0777' + owner: munin + group: www-data - name: Template apache config ansible.builtin.template: -- 2.34.1 From ac578cee8cebbfa2205fd994526b573c3bae80a8 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:33:50 +0200 Subject: [PATCH 33/47] dd --- roles/mgrote_munin_server/tasks/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 3b242247..ab50d01a 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -12,35 +12,43 @@ mode: "{{ item.mode }}" owner: "{{ item.owner }}" group: "{{ item.group }}" + recurse: "{{ item.recurse }}" loop: - name: /var/run/munin mode: '0755' owner: munin group: munin + recurse: false - name: /var/lib/munin-node/plugin-state mode: '0775' owner: munin group: munin + recurse: false - name: /etc/munin/plugins mode: '0755' owner: munin group: munin + recurse: false - name: /var/cache/munin/www mode: '0755' owner: munin group: root + recurse: false - name: /var/lib/munin mode: '0755' owner: munin group: munin + recurse: false - name: /var/cache/munin mode: '0755' owner: root group: root + recurse: false - name: /var/lib/munin/cgi-tmp mode: '0777' owner: munin group: www-data + recurse: true - name: Template apache config ansible.builtin.template: -- 2.34.1 From b5693bf526d2b1d633e612ba8ef039a3af593919 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:35:45 +0200 Subject: [PATCH 34/47] d --- roles/mgrote_munin_server/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index ab50d01a..722012f7 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -46,7 +46,7 @@ recurse: false - name: /var/lib/munin/cgi-tmp mode: '0777' - owner: munin + owner: www-data group: www-data recurse: true -- 2.34.1 From 46199897fb136148d77f00802ffd0dbfe6260583 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:43:49 +0200 Subject: [PATCH 35/47] dd --- roles/mgrote_munin_server/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 722012f7..a852ab24 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -44,7 +44,7 @@ owner: root group: root recurse: false - - name: /var/lib/munin/cgi-tmp + - name: /var/lib/munin/cgi-tmp # TODO hier wird immer changed angezeigt, vmtl 777 --> 644 mode: '0777' owner: www-data group: www-data -- 2.34.1 From 5c00597fb5905db0d020c5788659568b9de5b610 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:43:57 +0200 Subject: [PATCH 36/47] dd --- roles/mgrote_munin_server/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index a852ab24..3c9f8e78 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -45,7 +45,7 @@ group: root recurse: false - name: /var/lib/munin/cgi-tmp # TODO hier wird immer changed angezeigt, vmtl 777 --> 644 - mode: '0777' + mode: '0644' owner: www-data group: www-data recurse: true -- 2.34.1 From a1b6852876a11a708fd719f5b56fcb03267abf45 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:44:44 +0200 Subject: [PATCH 37/47] ff --- roles/mgrote_munin_server/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 3c9f8e78..a4bcd8e1 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -45,9 +45,9 @@ group: root recurse: false - name: /var/lib/munin/cgi-tmp # TODO hier wird immer changed angezeigt, vmtl 777 --> 644 - mode: '0644' + mode: '744' owner: www-data - group: www-data + group: munin recurse: true - name: Template apache config -- 2.34.1 From 1f0d43001129759f7735dfe30cbfdf2aedd7962b Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:45:47 +0200 Subject: [PATCH 38/47] ff --- roles/mgrote_munin_server/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index a4bcd8e1..9f6fc274 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -45,7 +45,7 @@ group: root recurse: false - name: /var/lib/munin/cgi-tmp # TODO hier wird immer changed angezeigt, vmtl 777 --> 644 - mode: '744' + mode: '644' owner: www-data group: munin recurse: true -- 2.34.1 From 6b2cb4b68874f0bc3bada5e99badb41183962947 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:46:30 +0200 Subject: [PATCH 39/47] ffd --- roles/mgrote_munin_server/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 9f6fc274..c4617f67 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -45,7 +45,7 @@ group: root recurse: false - name: /var/lib/munin/cgi-tmp # TODO hier wird immer changed angezeigt, vmtl 777 --> 644 - mode: '644' + mode: '774' owner: www-data group: munin recurse: true -- 2.34.1 From 0b3467209d80752a75c717fc322e1ff9906da7c2 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:49:01 +0200 Subject: [PATCH 40/47] dd --- roles/mgrote_munin_server/handlers/main.yml | 9 +++++++++ roles/mgrote_munin_server/tasks/main.yml | 7 ++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/roles/mgrote_munin_server/handlers/main.yml b/roles/mgrote_munin_server/handlers/main.yml index b45dc6cd..40bf2500 100644 --- a/roles/mgrote_munin_server/handlers/main.yml +++ b/roles/mgrote_munin_server/handlers/main.yml @@ -14,4 +14,13 @@ enabled: true masked: false state: restarted + +- name: "Ensure /var/lib/munin/cgi-tmp are set" + ansible.builtin.file: + path: /var/lib/munin/cgi-tmp + state: directory + mode: "0755" + owner: munin + group: www-data + recurse: true ... diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index c4617f67..5fa231f4 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -4,6 +4,7 @@ ansible.builtin.package: name: "{{ munin_packages }}" state: present + notify: "Ensure /var/lib/munin/cgi-tmp are set" - name: Ensure needed dirs exists ansible.builtin.file: @@ -44,11 +45,7 @@ owner: root group: root recurse: false - - name: /var/lib/munin/cgi-tmp # TODO hier wird immer changed angezeigt, vmtl 777 --> 644 - mode: '774' - owner: www-data - group: munin - recurse: true + notify: "Ensure /var/lib/munin/cgi-tmp are set" - name: Template apache config ansible.builtin.template: -- 2.34.1 From e0d011173c88658688b9384fcf5ad9a937518117 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:49:47 +0200 Subject: [PATCH 41/47] dd --- roles/mgrote_munin_server/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 5fa231f4..fb9a8663 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -43,7 +43,7 @@ - name: /var/cache/munin mode: '0755' owner: root - group: root + group: munin recurse: false notify: "Ensure /var/lib/munin/cgi-tmp are set" -- 2.34.1 From b7c8bfc55190b7f7a2e8b1fefa856fa94ee775f3 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:49:59 +0200 Subject: [PATCH 42/47] ff --- roles/mgrote_munin_server/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index fb9a8663..5fa231f4 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -43,7 +43,7 @@ - name: /var/cache/munin mode: '0755' owner: root - group: munin + group: root recurse: false notify: "Ensure /var/lib/munin/cgi-tmp are set" -- 2.34.1 From 7ae74e919d1a2449f5e0395198932b8708019ccc Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:51:28 +0000 Subject: [PATCH 43/47] Revert "ff" This reverts commit b7c8bfc55190b7f7a2e8b1fefa856fa94ee775f3. --- roles/mgrote_munin_server/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 5fa231f4..fb9a8663 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -43,7 +43,7 @@ - name: /var/cache/munin mode: '0755' owner: root - group: root + group: munin recurse: false notify: "Ensure /var/lib/munin/cgi-tmp are set" -- 2.34.1 From 0547881adb6184ec22178ebfa68ed942fd547372 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 18:51:36 +0000 Subject: [PATCH 44/47] Revert "dd" This reverts commit e0d011173c88658688b9384fcf5ad9a937518117. --- roles/mgrote_munin_server/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index fb9a8663..5fa231f4 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -43,7 +43,7 @@ - name: /var/cache/munin mode: '0755' owner: root - group: munin + group: root recurse: false notify: "Ensure /var/lib/munin/cgi-tmp are set" -- 2.34.1 From 7099ae980f92d121bce37a2008f5d93062ef580b Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:53:06 +0200 Subject: [PATCH 45/47] d --- roles/mgrote_munin_server/handlers/main.yml | 9 --------- roles/mgrote_munin_server/tasks/main.yml | 6 +++++- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/roles/mgrote_munin_server/handlers/main.yml b/roles/mgrote_munin_server/handlers/main.yml index 40bf2500..b45dc6cd 100644 --- a/roles/mgrote_munin_server/handlers/main.yml +++ b/roles/mgrote_munin_server/handlers/main.yml @@ -14,13 +14,4 @@ enabled: true masked: false state: restarted - -- name: "Ensure /var/lib/munin/cgi-tmp are set" - ansible.builtin.file: - path: /var/lib/munin/cgi-tmp - state: directory - mode: "0755" - owner: munin - group: www-data - recurse: true ... diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 5fa231f4..293f53c8 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -45,7 +45,11 @@ owner: root group: root recurse: false - notify: "Ensure /var/lib/munin/cgi-tmp are set" + - name: /var/lib/munin/cgi-tmp # TODO, ist immer changed + mode: "0755" + owner: munin + group: www-data + recurse: true - name: Template apache config ansible.builtin.template: -- 2.34.1 From 9e4ff174fd0feed9349486c365e424ff950a8374 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:54:04 +0200 Subject: [PATCH 46/47] dd --- roles/mgrote_munin_server/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 293f53c8..9a6b4a9e 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -46,7 +46,7 @@ group: root recurse: false - name: /var/lib/munin/cgi-tmp # TODO, ist immer changed - mode: "0755" + mode: "0775" owner: munin group: www-data recurse: true -- 2.34.1 From 8d5f620fd972ce32686562e47097b35ed7a42883 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 21 Aug 2024 20:54:55 +0200 Subject: [PATCH 47/47] ff --- roles/mgrote_munin_server/tasks/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 9a6b4a9e..ecce6fdc 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -4,7 +4,6 @@ ansible.builtin.package: name: "{{ munin_packages }}" state: present - notify: "Ensure /var/lib/munin/cgi-tmp are set" - name: Ensure needed dirs exists ansible.builtin.file: -- 2.34.1