---
- name: Create Frankfurter Directory
  become: yes
  become_user: jingrow
  file:
    dest: /home/jingrow/frankfurter
    state: directory

- name: Create Frankfurter Compose File
  become: yes
  become_user: jingrow
  template:
    src: docker-compose.yml
    dest: /home/jingrow/frankfurter/docker-compose.yml

- name: Update APT Cache
  apt:
    update_cache: yes

- name: Install Docker Compose
  apt:
    name: docker-compose-plugin
    state: latest

- name: Start Frankfurter
  become: yes
  become_user: jingrow
  command: docker-compose up -d
  args:
    chdir: /home/jingrow/frankfurter

- name: Setup NGINX Proxy for Frankfurter
  become: yes
  become_user: jingrow
  # This isn't implemented yet
  command: /home/jingrow/agent/env/bin/agent setup frankfurter
  args:
    chdir: /home/jingrow/agent
