Files
tripleo-operator-ansible/roles/tripleo_repos/tasks/main.yml
Alex Schultz 414cd8bfd9 Fix centos8 check
The version check for python3 should be greater than or equal to
8 and not less than.

Change-Id: I9e565b0814c992dbbc5ee71e43e36a839a2a4236
2020-02-10 11:47:54 -07:00

28 lines
888 B
YAML

---
# tasks file for tripleo_repos
# TODO(mwhahaha): uncomment this once we have a version of ansible with
# https://github.com/ansible/ansible/pull/65776
#
# - name: Gather distribution facts
# setup:
# gather_subset: "!all,!min,distribution,distribution_major_version"
- name: Gather the rpm package facts
package_facts:
- name: Install tripleo-repos
include_tasks: install.yml
when: (ansible_facts.distribution_major_version|int <= 7 and not 'python2-tripleo-repos' in ansible_facts.packages) or
(ansible_facts.distribution_major_version|int >= 8 and not 'python3-tripleo-repos' in ansible_facts.packages)
- name: Run tripleo-repos
command: >-
tripleo-repos
-b {{ tripleo_repos_branch }}
{{ tripleo_repos_extra_args | join(' ') }}
{{ tripleo_repos_version }}
{{ tripleo_repos_extra_repos | join(' ') }}
become: true
changed_when: true