check if the distro is ubuntu 20.04 or greater

This commit is contained in:
Andreas Zweili 2021-10-25 22:33:27 +02:00
parent 38f6f57300
commit e37aa731ba
1 changed files with 6 additions and 0 deletions

View File

@ -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"