From 15d8ebcf95c2b09b8f0174f416426271fb901181 Mon Sep 17 00:00:00 2001 From: djorgensen Date: Fri, 16 Aug 2024 13:08:15 -0600 Subject: [PATCH] add update-linux.yml --- update/update-linux.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 update/update-linux.yml diff --git a/update/update-linux.yml b/update/update-linux.yml new file mode 100644 index 0000000..d0447de --- /dev/null +++ b/update/update-linux.yml @@ -0,0 +1,27 @@ +--- +- name: Update and upgrade apt packages + hosts: all + become: true + tasks: + - name: Update packages with apt + when: ansible_pkg_mgr == 'apt' + apt: + update_cache: yes + + - name: Update packages with yum + when: ansible_pkg_mgr == 'yum' + yum: + name: '*' + state: latest + + - name: Upgrade packages with apt + when: ansible_pkg_mgr == 'apt' + apt: + upgrade: dist + + - name: Upgrade packages with yum + when: ansible_pkg_mgr == 'yum' + yum: + name: '*' + state: latest + exclude: kernel* \ No newline at end of file