---
- name: Create Agent NGINX Hosts Directory
  become: yes
  become_user: jingrow
  file:
    path: /home/jingrow/agent/nginx/hosts
    state: directory

- name: Create Agent NGINX Upstream Directory
  become: yes
  become_user: jingrow
  file:
    path: /home/jingrow/agent/nginx/upstreams
    state: directory

- name: Setup Agent Standalone
  become: yes
  become_user: jingrow
  command: '/home/jingrow/agent/env/bin/agent setup standalone --domain {{ domain }}'
  args:
    chdir: /home/jingrow/agent
