---
- name: Create config directory
  file:
    path: ~/.config/gallery-dl
    state: directory
    mode: 0755

# gallery-dl will complain that ~/.local/share/gallery-dl/log.txt is missing
# This path is configured inside the config file, so create it as desired
- name: Create directory in ~/.local/share
  file:
    path: ~/.local/share/gallery-dl
    state: directory
    mode: 0755

- name: Copy config
  template:
    src: config.j2
    dest: ~/.config/gallery-dl/config.json
    force: yes
    mode: 0644
