---

- name: Get Munin plugins
  get_url:
    url: "https://raw.githubusercontent.com/munin-monitoring/contrib/master/plugins/libvirt/{{ item }}"
    dest: "/etc/munin/plugins/"
    mode: "0755"
  loop:
  - kvm_cpu
  - kvm_io
  - kvm_mem
  notify: restart munin-node

- name: Copy Munin plugins conf
  copy:
    src: files/munin-plugins
    dest: "/etc/munin/plugin-conf.d/kvm"
    mode: "0644"
  notify: restart munin-node
