Skip to content

ASTRobinson/provision-ubuntu2004-on-wsl2

 
 

Repository files navigation

Provision Ubuntu 2004 on WSL2

Automating provisioning Ubuntu 20.04 with Ansible on WSL 2

Uses ansible, in a pipenv, 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.
  2. WSL 2
  3. Ubuntu 20.04 installed via Windows Store.

Configure Python & pipenv

  1. sudo apt install --yes python3-pip
  2. sudo pip3 install pipenv

Clone and Run

  1. git clone git@github.com:neilkidd/provision-ubuntu2004-on-wsl2.git
  2. cd provision-ubuntu2004-on-wsl2
  3. pipenv install --dev
  4. pipenv shell
  5. ansible-galaxy install -r requirements.yml
  6. ansible-playbook playbook.yml -i inventory --ask-become-pass
  7. Profit 😄

What is Installed?

Notes

Description Command
Find all local info ansible localhost -m setup
Run only rbenv ansible-playbook playbook.yml -i inventory --ask-become-pass --tags "rbenv"
Purge deps pipenv uninstall --all

See vars.yml to configure which tasks get run.

References

About

Automating provisoning ubuntu 20.04 with Ansible on WSL 2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published