From b17d9297bdc1cdcb2deac49672ab6d40481b1e01 Mon Sep 17 00:00:00 2001 From: iRaven Date: Mon, 20 Nov 2023 23:03:37 -0600 Subject: [PATCH] Update linux/pkgupgrade-apt.yaml --- linux/pkgupgrade-apt.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/linux/pkgupgrade-apt.yaml b/linux/pkgupgrade-apt.yaml index e69de29..f5cb636 100644 --- a/linux/pkgupgrade-apt.yaml +++ b/linux/pkgupgrade-apt.yaml @@ -0,0 +1,14 @@ +--- +## Runs automated apt update and apt upgrade on servers, skipping apt upgrade if there are no pkgs to be upgraded + +- hosts: all + gather_facts: yes + become: yes + + tasks: + - name: Update apt repo package lists + apt: update_cache=yes force_apt_get=yes cache_valid_time=3600 + + - name: Upgrade all apt packages + apt: upgrade=dist force_apt_get=yes + throttle: 1 \ No newline at end of file