From c182c953acd5da2cc8635a7e4b3ae06444737384 Mon Sep 17 00:00:00 2001 From: akshun Date: Mon, 29 Apr 2024 18:32:27 +0530 Subject: [PATCH] use os_family --- playbooks/update-packages.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/playbooks/update-packages.yml b/playbooks/update-packages.yml index 04f0d35..37d3023 100644 --- a/playbooks/update-packages.yml +++ b/playbooks/update-packages.yml @@ -7,13 +7,9 @@ - name: Update cache apt: update_cache: yes - when: - - ansible_distribution == 'Debian' - - ansible_distribution == 'Ubuntu' + when: ansible_facts['os_family'] == "Debian" - name: Upgrade packages apt: name: "*" state: latest - when: - - ansible_distribution == 'Debian' - - ansible_distribution == 'Ubuntu' + when: ansible_facts['os_family'] == "Debian"