Add a role to install/run tripleo-repos Change-Id: Ic75fb5bbdaaafb30dc90637edbbc169196ed8886
28 lines
888 B
YAML
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
|