---
- name: Create tinyauth directory
  file:
    path: /opt/tinyauth
    state: directory
    mode: "0755"

- name: Create docker-compose file for tinyauth
  template:
    src: docker-compose.yml.j2
    dest: /opt/tinyauth/docker-compose.yml
    mode: "0644"

- name: Start tinyauth
  shell: cd /opt/tinyauth && docker compose down && docker compose up -d
  args:
    chdir: /opt/tinyauth
