---
- name: Install macchiato
  aur: name=macchiato-git user={{ user.name }}
  tags:
    - aur

- name: Configure interfaces for macchiato
  copy: src=macchiato_default.sh dest=/etc/macchiato.d/{{ item }}.sh
  with_items: "{{ ansible_interfaces }}"

- name: Enable macchiato
  service: name=macchiato.service enabled=yes
  when: network.spoof_mac == True
  notify:
    - start macchiato

- name: Disable and stop macchiato
  service: name=macchiato.service enabled=no state=stopped
  when: network.spoof_mac == False
