refactor: uncomment APT tasks for package management in linux_updates.yaml
This commit is contained in:
+12
-11
@@ -23,19 +23,20 @@
|
|||||||
- hosts: debianhosts
|
- hosts: debianhosts
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
tasks:
|
tasks:
|
||||||
# - name: Update apt package cache
|
- name: Update apt package cache
|
||||||
# ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
# update_cache: yes
|
update_cache: yes
|
||||||
# cache_valid_time: 3600 # Update cache if it's older than 1 hour (3600 seconds)
|
cache_valid_time: 3600 # Update cache if it's older than 1 hour (3600 seconds)
|
||||||
|
|
||||||
# - name: Upgrade all packages to the latest version
|
- name: Upgrade all packages to the latest version
|
||||||
# ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
# upgrade: dist # Equivalent to apt-get dist-upgrade
|
upgrade: dist # Equivalent to apt-get dist-upgrade
|
||||||
# force_apt_get: yes # Ensure apt-get is used instead of aptitud
|
force_apt_get: yes # Ensure apt-get is used instead of aptitud
|
||||||
|
|
||||||
|
- name: Clean up unused dependencies
|
||||||
|
ansible.builtin.apt:
|
||||||
|
autoremove: yes
|
||||||
|
|
||||||
# - name: Clean up unused dependencies
|
|
||||||
# ansible.builtin.apt:
|
|
||||||
# autoremove: yes
|
|
||||||
- name: Check if a file exists
|
- name: Check if a file exists
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: /var/run/reboot-required
|
path: /var/run/reboot-required
|
||||||
|
|||||||
Reference in New Issue
Block a user