- Install Ansible (managed via Homebrew)
- Configure
.ssh/config
with server details (managed in ../.ssh/config - Distribute SSH keys
- Install Ansible requirements
ansible-galaxy install -r requirements.yml
ansible-playbook -i inventory.ini default-config.yml
The playbook will run apt update and upgrade, and also reboot the servers when a Kernel upgrade is required. The Ansible run waits for reboot completion.
Run the playbook
ansible-playbook -i inventory.ini upgrade_linux_vms.yml
Add more hosts
vim hosts
Linux upgrade playbook inspired by https://www.cyberciti.biz/faq/ansible-apt-update-all-packages-on-ubuntu-debian-linux/