|
5 | 5 | vars:
|
6 | 6 | docker_image: "livepeer/comfystream:0.0.3"
|
7 | 7 | comfyui_username: "comfyadmin"
|
8 |
| - comfyui_password: "Ge}_^jn?*?5#/|FWx9I&K|S0$/)#au8" # Set your own secure password! |
9 | 8 |
|
10 | 9 | tasks:
|
| 10 | + # Retrieve ComfyUI server password |
| 11 | + - name: Set ComfyUI password (static if provided, random if empty) |
| 12 | + set_fact: |
| 13 | + comfyui_password: "{{ comfyui_password | default(lookup('password', '/dev/null length=32 chars=ascii_letters,digits')) }}" |
11 | 14 | # Wait till VM is ready
|
12 | 15 | - name: Check if we can connect to the VM
|
13 | 16 | wait_for_connection:
|
|
126 | 129 | - /etc/caddy/certificates/selfsigned.key
|
127 | 130 | - /etc/caddy/certificates/selfsigned.crt
|
128 | 131 | notify: restart caddy
|
129 |
| - - name: Create Caddy configuration for Comfystream |
| 132 | + - name: Create Caddy configuration for ComfyUI server |
130 | 133 | template:
|
131 |
| - src: ../../templates/comfystream.caddy.j2 |
132 |
| - dest: /etc/caddy/comfystream.caddy |
| 134 | + src: ../../templates/comfyui.caddy.j2 |
| 135 | + dest: /etc/caddy/comfyui.caddy |
133 | 136 | owner: caddy
|
134 | 137 | group: caddy
|
135 | 138 | mode: "0644"
|
136 | 139 | notify: restart caddy
|
137 |
| - - name: Ensure Caddyfile includes Comfystream configuration |
| 140 | + - name: Ensure Caddyfile includes ComfyUI server configuration |
138 | 141 | lineinfile:
|
139 | 142 | path: /etc/caddy/Caddyfile
|
140 |
| - line: "import /etc/caddy/comfystream.caddy" |
| 143 | + line: "import /etc/caddy/comfyui.caddy" |
141 | 144 | create: yes
|
142 | 145 | notify: restart caddy
|
143 | 146 | # Ensure NVIDIA Container Toolkit is installed and configured
|
|
246 | 249 | command: "--download-models --build-engines --server"
|
247 | 250 | - name: Display Ansible completion message
|
248 | 251 | debug:
|
249 |
| - msg: ComfyStream is starting up, downloading models, and building TensorRT engines—this may take a while. Access ComfyUI when ready at https://<hosturl>:<COMFYUIPort>. |
| 252 | + msg: "ComfyStream is starting up, downloading models, and building TensorRT engines—this may take a while. Access ComfyUI when ready at https://{{ ansible_default_ipv4.address }}:<COMFYUIPort>." |
250 | 253 |
|
251 | 254 | handlers:
|
252 | 255 | - name: restart caddy
|
|
0 commit comments