Skip to content

Instantly share code, notes, and snippets.

@GonzaloAlvarez
Last active July 11, 2024 00:04
Show Gist options
  • Save GonzaloAlvarez/e7267b7420d7b621739c13f61860b62a to your computer and use it in GitHub Desktop.
Save GonzaloAlvarez/e7267b7420d7b621739c13f61860b62a to your computer and use it in GitHub Desktop.
bootstrap
#!/bin/bash -e
mkdir -p "$HOME/.bootstrap" && cd "$_"
curl -O "https://bootstrap.pypa.io/virtualenv.pyz"
$(command -v python3 || command -v python) virtualenv.pyz venv
source venv/bin/activate
python -m pip install --upgrade pip setuptools wheel ansible
python -m pip install dulwich --config-settings "--build-option=--pure" && python -c "from dulwich import porcelain;porcelain.clone('https://github.com/GonzaloAlvarez/provisioning', 'provisioning')"
[[ -d "$HOME/provisioning" ]] && cp -Rf "$HOME/provisioning" .
cd provisioning && ansible-galaxy install -r requirements.yml
ansible-playbook --connection=local --inventory=localhost --limit 127.0.0.1 playbooks/main.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment