ansible-roles/nginx/tasks/munin_vhost.yml
William Hirigoyen 0a590b6679
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2670|11|2659|11|:-1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/443//ansiblelint">Evolix » ansible-roles » unstable #443</a>
gitea/ansible-roles/pipeline/head This commit looks good
nginx: fix multiple fails in check mode
2024-01-03 11:29:20 +01:00

41 lines
1.1 KiB
YAML

---
- name: Add munin to hosts
ansible.builtin.lineinfile:
dest: /etc/hosts
regexp: 'munin$'
line: '127.0.0.1 munin'
insertafter: EOF
- name: Packages for Munin CGI are installed
ansible.builtin.apt:
name:
- liblwp-useragent-determined-perl
- libcgi-fast-perl
- spawn-fcgi
state: present
- name: Owner for munin-cgi is set to www-data:munin
ansible.builtin.shell:
cmd: "chown --verbose www-data:munin /var/log/munin/munin-cgi-*"
register: command_result
changed_when: "'changed' in command_result.stdout"
- name: Mode for munin-cgi is set to 660
ansible.builtin.shell:
cmd: "chmod --verbose 660 /var/log/munin/munin-cgi-*"
register: command_result
changed_when: "'changed' in command_result.stdout"
- name: Systemd unit for Munin-fcgi is installed
ansible.builtin.copy:
src: systemd/spawn-fcgi-munin-graph.service
dest: /etc/systemd/system/spawn-fcgi-munin-graph.service
- name: Systemd unit for Munin-fcgi is started
ansible.builtin.systemd:
name: spawn-fcgi-munin-graph
daemon_reload: yes
enabled: yes
state: started
when: not ansible_check_mode