--- - block: - name: install mandatory selinux packages package: name: policycoreutils-python state: installed when: ansible_distribution_major_version|int < 8 - block: - name: install mandatory selinux packages package: name: policycoreutils-python-utils state: installed when: ansible_distribution_major_version|int >= 8