This commit is contained in:
Michael Grote 2024-08-12 13:01:35 +02:00
parent e6175f9b46
commit a6ef27cce8
3 changed files with 9 additions and 86 deletions

View file

@ -5,6 +5,15 @@
name: "{{ munin_packages }}"
state: present
- name: Ensure needed dirs exists
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: '0755'
owner: munin
group: munin
loop: "{{ munin_dirs }}"
- name: Template apache config
ansible.builtin.template:
src: /etc/munin/apache.conf
@ -15,16 +24,6 @@
src: logrotate
dest: /etc/logrotate.d/munin
- name: Ensure needed dirs exists
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: '0755'
owner: munin
group: munin
loop: "{{ munin_dirs }}"
# (chfn -f 'munin' root) ??? TODO
- name: Enable fgcid
@ -39,7 +38,6 @@
COPY logrotate-munin
COPY munin.conf /etc/munin/munin.conf
COPY munin-node.conf /etc/munin/munin-node.conf
COPY ssmtp.conf /etc/ssmtp/ssmtp.conf

View file

@ -1,62 +0,0 @@
FROM ubuntu:24.04
# hadolint ignore=DL3008
RUN apt-get update && \
RUNLEVEL=1 DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
cron \
munin \
nginx \
apache2 \
wget \
libapache2-mod-fcgid \
libcgi-fast-perl \
ssmtp \
perl \
mailutils \
curl tzdata \
munin-node \
autoconf \
libfile-readbackwards-perl \
&& apt-get clean && \
rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*
RUN (cp /etc/munin/apache24.conf /etc/apache2/sites-available/000-default.conf) && \
(sed -i 's/^Alias.*/Alias \/ \/var\/cache\/munin\/www\//g' /etc/apache2/sites-available/000-default.conf) && \
(sed -i 's/Allow from .*/Satisfy Any/g' /etc/apache2/sites-available/000-default.conf) && \
(sed -i 's/Order allow,deny.*/Allow from all/g' /etc/apache2/sites-available/000-default.conf) && \
(mkdir -p /var/run/munin && \
chown -R munin:munin /var/run/munin) && \
(chfn -f 'munin' root) && \
(/usr/sbin/a2enmod fcgid) && \
rm -rf /etc/munin/plugins && \
mkdir -p /etc/munin/plugins
COPY run.sh /usr/local/bin/run
COPY munin_stats /etc/munin/plugins/munin_stats
COPY munin_update /etc/munin/plugins/munin_update
RUN chmod +x /etc/munin/plugins/munin_stats && \
chmod +x /etc/munin/plugins/munin_update && \
chmod +x /usr/local/bin/run
COPY 000-default.conf /etc/apache2/sites-available/000-default.conf
COPY logrotate-munin /etc/logrotate.d/munin
COPY munin.conf /etc/munin/munin.conf
COPY munin-node.conf /etc/munin/munin-node.conf
COPY ssmtp.conf /etc/ssmtp/ssmtp.conf
COPY revaliases /etc/ssmtp/revaliases
COPY munin_mail.conf /etc/munin/munin-conf.d/munin_mail.conf
# persist
VOLUME /var/lib/munin
VOLUME /var/log/munin
VOLUME /var/cache/munin
EXPOSE 80
# health check
HEALTHCHECK --interval=5m --timeout=3s \
CMD curl -f http://localhost/munin/ || exit 1
# launcher
CMD ["/usr/local/bin/run"]

View file

@ -1,13 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
":dependencyDashboard",
":semanticPrefixFixDepsChoreOthers",
":ignoreModulesAndTests",
"group:monorepos",
"group:recommended",
"replacements:all",
"workarounds:all",
"mergeConfidence:all-badges"
]
}