comment out APT module tasks in linux_updates.yaml

This commit is contained in:
2025-09-10 07:59:27 -04:00
parent 298e9d8757
commit ee5fe4f78f
+23 -14
View File
@@ -23,22 +23,31 @@
- hosts: debianhosts - hosts: debianhosts
gather_facts: no gather_facts: no
tasks: tasks:
- name: Update all installed packages using APT module # - name: Update all installed packages using APT module
apt: # apt:
name: '*' # name: '*'
state: latest # state: latest
update_cache: yes # update_cache: yes
only_upgrade: yes # only_upgrade: yes
register: apt_update_status # register: apt_update_status
- name: Remove packages not needed anymore # - name: Remove packages not needed anymore
apt: # apt:
autoremove: yes # autoremove: yes
- name: Reboot when packages were updated # - name: Reboot when packages were updated
reboot: # reboot:
post_reboot_delay: 60 # post_reboot_delay: 60
when: apt_update_status.changed # when: apt_update_status.changed
- name: Remove a package
hosts: all
become: yes # Run tasks with sudo privileges
tasks:
- name: Remove the 'opencockpit' package
ansible.builtin.apt:
name: openitcockpit-agent
state: absent
#- hosts: apkhosts #- hosts: apkhosts
# tasks: # tasks: