homeserver/roles/mgrote_munin_server/tasks/main.yml
Michael Grote 36ad021bd6
Some checks failed
ci/woodpecker/push/gitleaks Pipeline was successful
ci/woodpecker/pr/gitleaks Pipeline was successful
ci/woodpecker/pr/ansible-lint Pipeline failed
ci/woodpecker/push/ansible-lint Pipeline failed
ff
2024-08-12 13:06:55 +02:00

56 lines
1.2 KiB
YAML

---
- name: ensure packages are installed
become: true
ansible.builtin.package:
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
dest: /etc/apache2/sites-available/000-default.conf
- name: Template logrotate config
ansible.builtin.template:
src: logrotate
dest: /etc/logrotate.d/munin
# (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:
src: "{{ item }}"
dest: "/etc/munin/plugins/{{ item }}"
mode: '0755'
loop: "{{ munin_server_plugins }}"
- name: Template munin config
ansible.builtin.template:
src: munin.conf
dest: /etc/munin/munin.conf
mode: '0644'
owner: munin
group: munin
# TODO mail config? wie senden?
# COPY munin_mail.conf /etc/munin/munin-conf.d/munin_mail.conf
# launcher
CMD ["/usr/local/bin/run"]
COPY run.sh /usr/local/bin/run
chmod +x /usr/local/bin/run
# cronjoib? timer?