From a75db3d2643de776fc147c2cb0ba4419a35ae9e5 Mon Sep 17 00:00:00 2001 From: Sjaak van den Berg Date: Tue, 16 Dec 2025 00:48:50 +0100 Subject: [PATCH] 20251216T004850CET --- install-uv.sh | 18 ++++++++++++++++++ requirements.yml | 4 ++++ user-data | 9 +++++++++ 3 files changed, 31 insertions(+) create mode 100644 install-uv.sh create mode 100644 requirements.yml diff --git a/install-uv.sh b/install-uv.sh new file mode 100644 index 0000000..330e50e --- /dev/null +++ b/install-uv.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -euo pipefail + +DOWNLOAD_URL=https://github.com/astral-sh/uv/releases/download +UV_VERSION=0.9.17 + +curl --location \ + ${DOWNLOAD_URL}/${UV_VERSION}/uv-x86_64-unknown-linux-gnu.tar.gz \ + --output /tmp/uv-x86_64-unknown-linux-gnu.tar.gz +curl --silent --location \ + ${DOWNLOAD_URL}/${UV_VERSION}/uv-x86_64-unknown-linux-gnu.tar.gz.sha256 \ + | sha256sum --check + +tar --extract --strip=1 --file /tmp/uv-x86_64-unknown-linux-gnu.tar.gz --directory /usr/local/bin + +chown ghost:ghost /usr/local/bin/uv* + +chmod +x /usr/local/bin/uv* diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 0000000..339edd5 --- /dev/null +++ b/requirements.yml @@ -0,0 +1,4 @@ +--- +collections: + - name: ansible.posix + version: 2.1.0 \ No newline at end of file diff --git a/user-data b/user-data index 730f7d5..08684f9 100644 --- a/user-data +++ b/user-data @@ -33,3 +33,12 @@ runcmd: - deluser --remove-all-files linuxuser - usermod --uid 1000 ghost - groupmod --gid 1000 ghost +- git clone https://git.svdb.dev/svdb/debian.git /tmp/debian +- bash /tmp/debian/install-uv.sh +- uv init --directory /tmp/debian +- uv add --directory /tmp/debian ansible-core==2.20.1 +- uv run --directory /tmp/debian -- ansible-galaxy collection install -r requirements.yml +- uv run --directory /tmp/debian -- ansible-playbook /tmp/debian/provision.yml +- uv cache clean +- rm --recursive --force $(uv python dir) +- rm --recursive --force $(uv tool dir)