Added an update playbook

This commit is contained in:
Mike Wilson
2024-11-08 16:46:13 -05:00
parent 83bbfafb46
commit 760df9b17f
5 changed files with 49 additions and 13 deletions

34
ansible/update.yml Normal file
View File

@@ -0,0 +1,34 @@
- name: Update pacman systems
hosts: chat-vm
tasks:
- name: Full system upgrade
community.general.pacman:
update_cache: true
upgrade: true
become: true
notify: reboot
handlers:
- name: reboot
ansible.builtin.reboot:
become: true
- name: Update apt systems
hosts:
- debian-vms
- pve
tasks:
- name: Pull from repos and update all packages
ansible.builtin.apt:
name: "*"
state: latest
update_cache: yes
autoremove: yes
become: true
notify: reboot
handlers:
- name: reboot
ansible.builtin.reboot: