diff --git a/Dockerfile b/Dockerfile index fe011574..90fdd1e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,9 @@ RUN uv sync --locked --no-dev # Copy application code COPY . . +# Install Ansible Galaxy collections for cloud provider modules +RUN uv run ansible-galaxy collection install -r requirements.yml + # Set executable permissions and prepare runtime # Note: /algo must remain root-owned for --cap-drop=all compatibility # (root without CAP_DAC_OVERRIDE cannot write to files owned by others) diff --git a/algo b/algo index fc320f41..1ebb0950 100755 --- a/algo +++ b/algo @@ -152,6 +152,12 @@ if ! command -v uv &> /dev/null; then echo "✓ uv installed successfully via ${UV_INSTALL_METHOD}!" fi +# Install Ansible Galaxy collections if requirements.yml exists +# This is needed for cloud providers that use collection modules (Linode, DigitalOcean, Azure, etc.) +if [ -f "requirements.yml" ]; then + uv run ansible-galaxy collection install -r requirements.yml > /dev/null 2>&1 || true +fi + # Run the appropriate playbook case "$1" in update-users)