2024-08-12 12:46:22 +02:00
|
|
|
---
|
|
|
|
- name: ensure packages are installed
|
|
|
|
become: true
|
|
|
|
ansible.builtin.package:
|
|
|
|
name: "{{ munin_packages }}"
|
|
|
|
state: present
|
|
|
|
|
2024-08-12 12:53:37 +02:00
|
|
|
- name: Template apache config
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: /etc/munin/apache.conf
|
2024-08-12 12:47:43 +02:00
|
|
|
dest: /etc/apache2/sites-available/000-default.conf
|
|
|
|
|
2024-08-12 12:59:52 +02:00
|
|
|
- name: Ensure needed dirs exists
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
mode: '0755'
|
|
|
|
owner: munin
|
|
|
|
group: munin
|
|
|
|
loop: "{{ munin_dirs }}"
|
2024-08-12 12:47:43 +02:00
|
|
|
|
2024-08-12 12:59:52 +02:00
|
|
|
# (chfn -f 'munin' root) ??? TODO
|
2024-08-12 12:46:22 +02:00
|
|
|
|
2024-08-12 12:59:52 +02:00
|
|
|
- name: Enable fgcid
|
|
|
|
ansible.builtin.command: /usr/sbin/a2enmod fcgid # TODO CHANGED/when
|
2024-08-12 12:46:22 +02:00
|
|
|
|
2024-08-12 12:59:52 +02:00
|
|
|
- name: Template munin-server plugins
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: "{{ item }}"
|
|
|
|
dest: "/etc/munin/plugins/{{ item }}"
|
|
|
|
mode: '0755'
|
|
|
|
loop: "{{ munin_server_plugins }}"
|
2024-08-12 12:46:22 +02:00
|
|
|
|
|
|
|
COPY run.sh /usr/local/bin/run
|
|
|
|
|
|
|
|
chmod +x /usr/local/bin/run
|
|
|
|
|
|
|
|
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"]
|