reconfig role update and upgrade with autoremove
This commit is contained in:
parent
fa7c08d3e9
commit
f898e9263c
|
@ -1,27 +1,30 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
# update packages
|
# step1 - run apt-get update
|
||||||
- name: update packages
|
- name: update index of all packages
|
||||||
|
ansible.builtin.apt:
|
||||||
|
update_cache: true
|
||||||
|
force_apt_get: true
|
||||||
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
# step2 - run apt-get update
|
||||||
|
- name: update all packages to their latest version
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: "*"
|
name: "*"
|
||||||
state: latest
|
state: latest
|
||||||
update_cache: true
|
|
||||||
force_apt_get: true
|
force_apt_get: true
|
||||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
# step3 - run apt-get full-upgrade
|
||||||
# upgrade packages
|
- name: upgrade the OS (apt-get dist-upgrade)
|
||||||
- name: upgrade packages
|
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
upgrade: dist
|
upgrade: dist
|
||||||
state: latest
|
|
||||||
force_apt_get: true
|
force_apt_get: true
|
||||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
# step4 - run apt autoremove
|
||||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
- name: autoremove packages unused dependency packages
|
||||||
# autoremove packages , remove unused dependency packages
|
|
||||||
- name: autoremove packages
|
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
autoremove: true
|
autoremove: true
|
||||||
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
force_apt_get: true
|
||||||
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
Loading…
Reference in New Issue