diff --git a/roles/config-update-and-upgrade-packages/tasks/main.yaml b/roles/config-update-and-upgrade-packages/tasks/main.yaml index 6c53dbe..7f8a2e6 100644 --- a/roles/config-update-and-upgrade-packages/tasks/main.yaml +++ b/roles/config-update-and-upgrade-packages/tasks/main.yaml @@ -1,27 +1,30 @@ --- -#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# update packages -- name: update packages +# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +# step1 - run apt-get update +- 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: name: "*" state: latest - update_cache: true force_apt_get: true -#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# upgrade packages -- name: upgrade packages +# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +# step3 - run apt-get full-upgrade +- name: upgrade the OS (apt-get dist-upgrade) ansible.builtin.apt: upgrade: dist - state: latest force_apt_get: true -#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# autoremove packages , remove unused dependency packages -- name: autoremove packages +# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +# step4 - run apt autoremove +- name: autoremove packages unused dependency packages ansible.builtin.apt: autoremove: true -#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file + force_apt_get: true +# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++