Skip to content

Commit 02bd5a5

Browse files
committed
fix(dev): use shell for piped commands in Ansible
This fix ensures that we use the `shell` module instead of `command` since `command` does not support pipes (`|`). This prevents errors when checking for installed packages and configurations.
1 parent 6de691c commit 02bd5a5

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

scripts/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This repository includes an [Ansible playbook](https://docs.ansible.com/ansible/
1919
- **Storage**: 100GB
2020

2121
> [!TIP]
22-
> You can use the `spinup_comfystream_tensordock.py --bare-vm` script to create a [compatible VM on TensorDock](https://marketplace.tensordock.com/deploy?gpu=geforcertx4090-pcie-24gb&gpuCount=1&ramAmount=16&vcpuCount=4&storage=100&os=Ubuntu-22.04-LTS).
22+
> You can use the `spinup_comfystream_tensordock.py --bare-vm` script to create a [compatible VM on TensorDock](https://marketplace.tensordock.com/deploy?gpu=geforcertx4090-pcie-24gb&gpuCount=1&ramAmount=16&vcpuCount=4&storage=100&os=Ubuntu-22.04-LTS)
2323
2424
2. **Open Required Ports**:
2525
Ensure the following ports are open **inbound and outbound** on the VM's firewall/security group:
@@ -39,12 +39,15 @@ This repository includes an [Ansible playbook](https://docs.ansible.com/ansible/
3939
ansible-playbook -i ansible/inventory.yaml ansible/plays/setup_comfystream.yaml
4040
```
4141

42+
> [!IMPORTANT]
43+
> When using a non-sudo user, add `--ask-become-pass` to provide the sudo password or use an Ansible vault for secure storage.
44+
4245
6. **Access the Server**:
4346
After successful execution, the access URLs for **ComfyStream** will be displayed.
4447

4548
> [!IMPORTANT]
4649
> If you encounter a `toomanyrequests` error while pulling the Docker image, either wait a few minutes or provide your Docker credentials when running the playbook:
47-
>
50+
>
4851
> ```bash
4952
> ansible-playbook -i ansible/inventory.yaml ansible/plays/setup_comfystream.yaml -e "docker_hub_username=your_dockerhub_username docker_hub_password=your_dockerhub_pat"
5053
> ```

scripts/ansible/plays/setup_comfystream.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@
142142
notify: restart caddy
143143
# Ensure NVIDIA Container Toolkit is installed and configured
144144
- name: Check if NVIDIA Container Toolkit is installed
145-
command: dpkg -l | grep nvidia-container-toolkit
145+
shell: dpkg -l | grep nvidia-container-toolkit
146146
register: nvidia_toolkit_installed
147147
ignore_errors: yes
148148
changed_when: false
149149
- name: Check if NVIDIA runtime is configured in Docker
150-
command: docker info | grep -i nvidia
150+
shell: docker info | grep -i nvidia
151151
register: nvidia_runtime_configured
152152
ignore_errors: yes
153153
changed_when: false

0 commit comments

Comments
 (0)