homelab/ansible
2022-02-12 22:11:38 -08:00
..
provisioning Update Homer with public cloud subtitles and logos 2022-02-12 22:11:38 -08:00
ansible.cfg Implement initial Ansible config 2022-02-11 12:32:52 -08:00
id_rsa.pub Update Homer with public cloud subtitles and logos 2022-02-12 22:11:38 -08:00
inventory.ini Update Homer with public cloud subtitles and logos 2022-02-12 22:11:38 -08:00
node-exporter.yml Implement initial Ansible config 2022-02-11 12:32:52 -08:00
provision-host.yml Update Homer with public cloud subtitles and logos 2022-02-12 22:11:38 -08:00
README.md Implement basic Ansible config 2022-02-11 12:32:38 -08:00
requirements.yml Implement initial Ansible config 2022-02-11 12:32:52 -08:00

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.

  1. Open Powershell as Administrator
  2. Install Debian with wsl.exe --install --distribution Debian
  3. Launch the instance with wsl.exe -d Debian
  4. 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
    
  5. Clean and update the cache with sudo apt clean && sudo apt update
  6. Upgrade all packages with sudo apt full-upgrade
  7. Remove dangling packages with sudo apt autoremove
  8. Log out with exit, shutdown wsl with wsl.exe --shutdown, then start it back up with wsl.exe -d Debian.
  9. Make sure everything worked with cat /etc/os-release