From a294967baf86992e0ff24588f28edf37b2a7e055 Mon Sep 17 00:00:00 2001 From: Radar231 Date: Thu, 30 Dec 2021 14:22:13 -0500 Subject: [PATCH] changed from ansible_distribution to ansible_os_family --- tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index d1b080e..b7d64ef 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -16,18 +16,18 @@ apt: name: "*" state: latest - when: ansible_distribution == "Ubuntu" or ansible_distribution == "Pop!_OS" or ansible_distribution == "Linux Mint" + when: ansible_os_family == "Debian" - name: Clean up the autoremove packages (Ubuntu) apt: autoremove: true purge: true - when: ansible_distribution == "Ubuntu" or ansible_distribution == "Pop!_OS" or ansible_distribution == "Linux Mint" + when: ansible_os_family == "Debian" - name: Clean up any packages left in the 'rc' state (Ubuntu) shell: cmd: /usr/bin/apt -y --purge remove $(dpkg -l | grep "^rc " | sed 's/ \+/ /g' | cut -d ' ' -f2) - when: ansible_distribution == "Ubuntu" or ansible_distribution == "Pop!_OS" or ansible_distribution == "Linux Mint" + when: ansible_os_family == "Debian" - name: Upgraded packages (CentOS) yum: