From e37aa731ba039b468da4790617129d952e1399ea Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Mon, 25 Oct 2021 22:33:27 +0200 Subject: [PATCH] check if the distro is ubuntu 20.04 or greater --- tasks/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index 6945eb8..2fcdcab 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,3 +1,9 @@ +- name: "Python is Python3" + apt: + name: "python-is-python3" + state: "present" + when: ansible_facts['distribution_major_version'] >= "20.04" + - name: "Upgrade to the latest packages" apt: upgrade: "dist"