39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
---
|
|
- name: ensure packages are installed
|
|
become: true
|
|
ansible.builtin.package:
|
|
name: "{{ munin_packages }}"
|
|
state: present
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
# launcher
|
|
CMD ["/usr/local/bin/run"]
|