---

- name: Copy Munin config for Nginx
  template:
    src: munin/evolinux.nginx
    dest: /etc/munin/plugin-conf.d/
    mode: "0644"
  notify: restart munin

- name: Enable Munin plugins for Nginx
  file:
    src: '/usr/share/munin/plugins/{{ item }}'
    dest: '/etc/munin/plugins/{{ item }}'
    state: link
  loop:
    - nginx_request
    - nginx_status
  notify: restart munin
