---
- name: pyradio | Create config directory
  file:
    path: '{{ xdg_dir.config_home }}/pyradio'
    state: directory
    mode: '755'

- name: pyradio | Synchronize config files
  ansible.posix.synchronize:
    src: pyradio/
    dest: '{{ xdg_dir.config_home }}/pyradio/'
    recursive: true
    delete: true

- name: pyradio | Create 'themes' directory
  file:
    path: '{{ xdg_dir.config_home }}/pyradio/themes'
    state: directory
    mode: '755'

- name: pyradio | Copy theme files
  template:
    src: pyradio/{{ item }}.j2
    dest: '{{ xdg_dir.config_home }}/pyradio/themes/{{ item }}'
    mode: '644'
  loop:
    - blue.pyradio-theme
