Sanitized mirror from private repository - 2026-04-19 08:15:48 UTC
This commit is contained in:
28
ansible/playbooks/update_system.yml
Normal file
28
ansible/playbooks/update_system.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
- name: Update Debian-based systems
|
||||
hosts: debian_clients
|
||||
become: yes
|
||||
vars:
|
||||
ansible_become_method: sudo
|
||||
|
||||
tasks:
|
||||
- name: Update package cache
|
||||
apt:
|
||||
update_cache: yes
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: Upgrade all packages
|
||||
apt:
|
||||
upgrade: full
|
||||
autoclean: yes
|
||||
autoremove: yes
|
||||
|
||||
- name: Check for available updates
|
||||
command: apt list --upgradable
|
||||
register: apt_updates
|
||||
changed_when: false
|
||||
check_mode: no
|
||||
|
||||
- name: Show available updates
|
||||
debug:
|
||||
var: apt_updates.stdout_lines
|
||||
Reference in New Issue
Block a user