From 8799208c2db0fbc3a8d5cdd317eab62c5cae2605 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Mon, 12 Aug 2024 12:44:55 +0200 Subject: [PATCH] dd --- group_vars/munin.yml | 2 ++ playbooks/3_service/munin.yml | 9 ++++++++ roles/mgrote_munin_server/dd | 39 +++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 roles/mgrote_munin_server/dd diff --git a/group_vars/munin.yml b/group_vars/munin.yml index cf580c40..c0ce1548 100644 --- a/group_vars/munin.yml +++ b/group_vars/munin.yml @@ -66,3 +66,5 @@ munin_hosts: # notfications config # cgi? +# rrdcache +# rolle wieder aus image ausabuen diff --git a/playbooks/3_service/munin.yml b/playbooks/3_service/munin.yml index 99052651..52c62334 100644 --- a/playbooks/3_service/munin.yml +++ b/playbooks/3_service/munin.yml @@ -16,3 +16,12 @@ owner: root group: root state: link + + - name: ensure apache.conf symlink exists + become: true + ansible.builtin.file: + src: /etc/munin/apache24.conf + dest: /var/www/html/munin.mgrote.net + owner: root + group: root + state: link diff --git a/roles/mgrote_munin_server/dd b/roles/mgrote_munin_server/dd new file mode 100644 index 00000000..29f45eb8 --- /dev/null +++ b/roles/mgrote_munin_server/dd @@ -0,0 +1,39 @@ +DirectoryIndex index.php index.html + + + ServerName munin.mgrote.net + ServerAlias munin + + ServerAdmin info@mgrote.net + + DocumentRoot /var/www/html/munin.mgrote.net + + ErrorLog /var/log/apache2/munin.mgrote.net-error.log + CustomLog /var/log/apache2/munin.mgrote.net-access.log combined + + # Rewrites + RewriteEngine On + + # Static content in /static + RewriteRule ^/favicon.ico /etc/munin/static/favicon.ico [L] + RewriteRule ^/static/(.*) /etc/munin/static/$1 [L] + + # HTML + RewriteCond %{REQUEST_URI} .html$ [or] + RewriteCond %{REQUEST_URI} =/ + RewriteRule ^/(.*) /usr/lib/munin/cgi/munin-cgi-html/$1 [L] + + # Images + RewriteRule ^/munin-cgi/munin-cgi-graph/(.*) /usr/lib/munin/cgi/munin-cgi-graph/$1 [L] + + # Ensure we can run (fast)cgi scripts + + Options +ExecCGI + + SetHandler fcgid-script + + + SetHandler cgi-script + + +