.. | ||
provisioning | ||
ansible.cfg | ||
id_rsa.pub | ||
inventory.ini | ||
node-exporter.yml | ||
provision-host.yml | ||
README.md | ||
requirements.yml |
Ansible
This project contains inventory, var, and playbook files to administrate the homelab.
Useful Ad-Hoc Commands
ansible all -m ping # ping all hosts
ansible all -a "free -h" # won't work on BSD
ansible all -m apt -a "name=inxi state=latest update_cache=true" --become # install inxi
ansible all -m shell -a "inxi -b" # run inxi
Running on WSL
Running a proper ansible install on WSL requires updating to Debian 11.
- Open Powershell as Administrator
- Install Debian with
wsl.exe --install --distribution Debian
- Launch the instance with
wsl.exe -d Debian
- Change the apt repositories with
sudo nano /etc/apt/sources.list
and update it to look like this:deb http://deb.debian.org/debian bullseye main contrib non-free deb http://deb.debian.org/debian bullseye-updates main contrib non-free deb http://security.debian.org/debian-security bullseye-security main contrib non-free
- Clean and update the cache with
sudo apt clean && sudo apt update
- Upgrade all packages with
sudo apt full-upgrade
- Remove dangling packages with
sudo apt autoremove
- Log out with
exit
, shutdown wsl withwsl.exe --shutdown
, then start it back up withwsl.exe -d Debian
. - Make sure everything worked with
cat /etc/os-release