This commit is contained in:
Michael Grote 2024-08-12 12:59:52 +02:00
parent f5660d7d3a
commit 725385600e
2 changed files with 22 additions and 23 deletions

View file

@ -13,14 +13,8 @@ munin_packages:
- curl tzdata - curl tzdata
- munin-node - munin-node
- libfile-readbackwards-perl - libfile-readbackwards-perl
apt_packages_physical:
- hddtemp munin_servername: "{{ ansible_fwdn }}"
- ipmitool munin_dirs:
- powertop - /var/run/munin
- s-tui - /etc/munin/plugins
apt_packages_vm:
- qemu-guest-agent
- open-vm-tools
apt_packages_extra:
apt_packages_absent:
apt_packages_internet:

View file

@ -10,24 +10,29 @@
src: /etc/munin/apache.conf src: /etc/munin/apache.conf
dest: /etc/apache2/sites-available/000-default.conf dest: /etc/apache2/sites-available/000-default.conf
- 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
ansible.builtin.command: /usr/sbin/a2enmod fcgid # TODO CHANGED/when
- name: Template munin-server plugins
ansible.builtin.template:
(mkdir -p /var/run/munin && \ src: "{{ item }}"
chown -R munin:munin /var/run/munin) && \ dest: "/etc/munin/plugins/{{ item }}"
(chfn -f 'munin' root) && \ mode: '0755'
(/usr/sbin/a2enmod fcgid) && \ loop: "{{ munin_server_plugins }}"
rm -rf /etc/munin/plugins && \
mkdir -p /etc/munin/plugins
COPY run.sh /usr/local/bin/run 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 chmod +x /usr/local/bin/run
COPY logrotate-munin /etc/logrotate.d/munin COPY logrotate-munin /etc/logrotate.d/munin