Skip to content

Latest commit

 

History

History

ansible

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Ansible Playbooks for maintenance

Requirements

  1. Install Ansible (managed via Homebrew)
  2. Configure .ssh/config with server details (managed in ../.ssh/config
  3. Distribute SSH keys
  4. Install Ansible requirements
ansible-galaxy install -r requirements.yml

Use cases

Base packages

ansible-playbook -i inventory.ini default-config.yml 

Linux VMs Upgrades

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

Ansible inventory

Thanks

Linux upgrade playbook inspired by https://www.cyberciti.biz/faq/ansible-apt-update-all-packages-on-ubuntu-debian-linux/