2025-12-23 20:48:07 +08:00

37 lines
873 B
YAML

---
- 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: Create NGINX Proxy Configuration File
become: yes
become_user: jingrow
file:
path: /home/jingrow/agent/nginx/proxy.conf
state: touch
- name: Symlink NGINX Proxy Configuration File
file:
src: /home/jingrow/agent/nginx/proxy.conf
dest: /etc/nginx/conf.d/proxy.conf
state: link
force: yes
follow: no
- name: Setup Agent Proxy
become: yes
become_user: jingrow
command: '/home/jingrow/agent/env/bin/agent setup proxy --domain {{ domain }} --jcloude-url {{ jcloude_url }}'
args:
chdir: /home/jingrow/agent