diff --git a/ubuntu/package-update.yml b/ubuntu/package-update.yml new file mode 100644 index 0000000..9042f8f --- /dev/null +++ b/ubuntu/package-update.yml @@ -0,0 +1,7 @@ +--- +- name: Update packages on nodes + hosts: cloud + user: root + + roles: + - package-update diff --git a/ubuntu/roles/package-update/tasks/main.yml b/ubuntu/roles/package-update/tasks/main.yml new file mode 100644 index 0000000..2f04dad --- /dev/null +++ b/ubuntu/roles/package-update/tasks/main.yml @@ -0,0 +1,5 @@ +--- +# This role updates packages and performs autoremove + +- name: Update apt cache and then packages with autoremove + apt: update_cache=yes upgrade=safe autoremove=yes