/provision-ubuntu-on-wsl2

Automating provisoning Ubuntu with Ansible on WSL 2

MIT LicenseMIT

Provision Ubuntu on WSL2

Automating provisioning Ubuntu with Ansible on WSL 2

Uses ansible in a WSL 2 Ubuntu instance to provision locally.

Intended to be re-runnable (idempotent) to maintain and update when required.

Getting Started

Prerequisites

  1. Windows 10 or 11.
  2. WSL 2

Update the package lists and install Ansible

  1. sudo apt update && sudo apt install -y ansible

Clone and Run

  1. git clone https://github.com/worldofgeese/provision-ubuntu-on-wsl2.git
  2. cd provision-ubuntu-on-wsl2
  3. ansible-galaxy install -r requirements.yml --force
  4. ansible-playbook playbook.yml -i inventory --ask-become-pass -e '{"nix_flakes": true}'
  5. exit then open a new shell to make Nix available to your environment
  6. Profit 😄

What is Installed?

Notes

Description Command
Find all local info ansible localhost -m setup

See vars.yml to configure which tasks get run.

References