add ansible playbook setup

This commit is contained in:
Alexander Navarro 2025-07-21 11:57:03 -04:00
parent 78bfbc3ed6
commit 2a914766ba
3 changed files with 123 additions and 0 deletions

17
bootstrap/bootstrap.sh Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
if ! command -v uv >/dev/null 2>&1; then
curl -LsSf https://astral.sh/uv/install.sh | sh
fi
if [[ -d ~/.config/dotfiles ]]; then
# dotfiles are cloned, executed localy
uvx --with ansible --from ansible-core ansible-playbook --ask-become-pass bootstrap.yaml
else
# dotfiles are not cloned, executed remotly
uvx --with ansible --from ansible-core ansible-pull --ask-become-pass --url ssh://git@git.alecodes.page:24062/alecodes/dots.git bootstrap/bootstrap.yaml
fi