Ansible playbook for workstation configuration. I built this to have an "ephemeral" Ubuntu image on my workstations that would be consistent. Feel free to use/share!
This playbook will install/update to the most recent versions available of the following components (links to latest for Ubuntu 20.04LTS, but the playbook isn't fixed on that):
- git CLI latest
- Openshift and kubectl CLI latest
- Azure CLI latest
- AWS CLI latest
- Terraform CLI latest
- Packer CLI latest
- podman (kubic) latest
This playbook will install/update to the most recent version available within the default Ubuntu APT repository:
- unzip latest
- ruby latest
- jq latest
- maven latest
- python3 latest
- openjdk-17-jre-headless latest
- php latest
- libapache2-mod-php latest
- apache2 latest
For a Windows workstation, first install WSL
wsl --install
This will by default install Ubuntu 20.04LTS. Also suggest installing Windows Terminal
Check DNS of the base configuration. If DNS isn't working, fix the WSL DNS issue if necessary by creating /etc/wsl.conf
with the following contents:
[network]
generateResolvConf = false
Shutdown the ubuntu image from the windows command line:
wsl --shutdown
Restart the ubuntu image, then remove the symbolic link:
sudo rm /etc/resolv.conf
Then create a new /etc/resolv.conf file with the following contents:
nameserver 1.1.1.1
Then change the attributes of the /etc/resolv.conf file so that it is retained after a reboot:
sudo chattr -f +i /etc/resolv.conf
Run the following commands to install ansible:
sudo apt update
sudo apt upgrade -y
sudo add-apt-repository --yes --update ppa:ansible/ansible -y
sudo apt install ansible -y
Note: there is an issue with the playbook getting the gpg key from Microsoft while connected to some VPNs. Disconnect from the VPN before running this playbook.
Clone this repository:
cd ~
git clone https://github.com/michaelshire/workstation.git
Modify the variables in the ~/workstation/vars.yaml
file.
Then run this playbook with:
cd ~/workstation
ansible-playbook playbook.yaml -K