Provide idempotent deployment mechanism for my computers from a versioned controlled source targeting Ubuntu
that is easy to set up and maintain. I am mostly using this setup with WSL2 on Windows 11 to sync various workstation and laptops; both for personal and professional usage.
wsl --unregister ${existing-distro}
wsl --install -d ${target-distro}
wsl --setdefault ${target-distro}
You will need to add a valid ssh-key to your GitHub account. I am still working on automating this.
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -N '' -C $USER@$HOSTNAME
Sometimes it is useful to pull your existing public keys from GitHub.
curl https://github.com/irish1986.keys >> ~/.ssh/authorized_keys
This playbook includes a custom shell script located at scripts/dotfiles
. This shell script is used to initialize your environment after installing Ubuntu
. It is not mandatory but recommended to perform a full system upgrade although recommended. By default, the only included roles is update
. Ansible Galaxy dependencies collection are installed automatically although given some issue occurs, you can run it maually as following.
bash -c "$(curl -fsSL https://raw.githubusercontent.com/irish1986/dotfiles/main/scripts/setup)"
I am using Bitwarden integration with Ansible to retrieve secrets from Secrets Manager and inject them into the Ansible playbook. The lookup plugin will inject retrieved secrets as masked environment variables inside an Ansible playbook. To setup the collection:
pip install bitwarden-sdk
export BWS_ACCESS_TOKEN="<your-bws-access-token>"
The sample.yml
file contains an exemple configuration. Create a copy of this named all.yml
and make the recommended ajustment.
cp ~/.dotfiles/inventory/group_vars/sample.yml ~/.dotfiles/inventory/group_vars/all.yml
This repo is heavily influenced by: