update_os.yml

Added new file
This commit is contained in:
Morten Johansen 2025-07-17 05:51:54 +00:00
parent bc530d8d7e
commit 178fc56b6a

12
update_os.yml Normal file
View file

@ -0,0 +1,12 @@
- hosts: all
become: true
tasks:
- name: Update apt cache (Debian/Ubuntu)
apt:
update_cache: yes
when: ansible_distribution == "Ubuntu" or ansible_distribution == "Debian"
- name: Upgrade all packages (Debian/Ubuntu)
apt:
upgrade: dist
when: ansible_distribution == "Ubuntu" or ansible_distribution == "Debian"