---
- name: Create config directories
  file:
    path: '~/.config/{{ item }}'
    state: directory
    mode: 0755
  loop:
    - mpd
    - ncmpcpp
    - mpDris2

# Or else mpd will fail to start
- name: Create mpd directory in ~/.local/share
  file:
    path: ~/.local/share/mpd/playlists
    state: directory
    mode: 0755

- name: Copy mpd config
  copy:
    src: mpd.conf
    dest: ~/.config/mpd/mpd.conf
    force: yes
    mode: 0644

- name: Copy mpDris2 config
  copy:
    src: mpDris2.conf
    dest: ~/.config/mpDris2/mpDris2.conf
    force: yes
    mode: 0644

- name: Copy ncmpcpp config
  copy:
    src: ncmpcpp.conf
    dest: ~/.config/ncmpcpp/config
    force: yes
    mode: 0644
