#!/usr/bin/env bash set -eou pipefail export ANSIBLE_STDOUT_CALLBACK=minimal if ! command -v uv >/dev/null 2>&1; then echo -e "Installing UV...\n" curl -LsSf https://astral.sh/uv/install.sh | sh fi echo -e "Executing playbook...\n" if [[ -d ~/.config/dotfiles ]]; then pushd ~/.config/dotfiles/bootstrap/ || exit # dotfiles are cloned, executed localy uvx --from ansible ansible-playbook --ask-become-pass bootstrap.yaml else # dotfiles are not cloned, executed remotly uvx --from ansible ansible-pull --ask-become-pass --url ssh://git@git.alecodes.page:24062/alecodes/dots.git bootstrap/bootstrap.yaml fi popd || exit echo -e "Done!\n"