Update update-apt-packages.yaml
This commit is contained in:
@@ -1,14 +1,10 @@
|
||||
---
|
||||
- name: Update and upgrade apt packages
|
||||
hosts: all
|
||||
|
||||
- hosts: all
|
||||
become: true
|
||||
tasks:
|
||||
- name: Update packages with apt
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
|
||||
- name: Upgrade packages with apt
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
ansible.builtin.apt:
|
||||
upgrade: dist
|
||||
- name: Update apt cache and upgrade all packages
|
||||
apt:
|
||||
update_cache: yes
|
||||
upgrade: dist
|
||||
autoremove: yes
|
||||
autoclean: yes
|
||||
Reference in New Issue
Block a user