Limit tripleo-repos to CentOS
Our example playbooks have tripleo_repos defined however if they are run on RHEL boxes this fails. Let's limit the tripleo_repos to just centos for now. Additionally switch to use ansible_facts for distribution version information as well. Change-Id: Ib9dc4219254b1afc9eb6b4e35099b1b3649930a7
This commit is contained in:
parent
d2619150b5
commit
4b60170a31
@ -36,6 +36,8 @@
|
||||
name: tripleo_repos
|
||||
vars:
|
||||
tripleo_repos_debug: "{{ standalone_debug }}"
|
||||
when:
|
||||
- ansible_facts.distribution == 'CentOS'
|
||||
|
||||
- name: Ensure system is up to date
|
||||
yum:
|
||||
@ -56,14 +58,14 @@
|
||||
name: python-tripleoclient
|
||||
state: installed
|
||||
become: true
|
||||
when: ansible_distribution_major_version|int <= 7
|
||||
when: ansible_facts.distribution_major_version|int <= 7
|
||||
|
||||
- name: install python3 tripleoclient
|
||||
package:
|
||||
name: python3-tripleoclient
|
||||
state: present
|
||||
become: true
|
||||
when: ansible_distribution_major_version|int >= 8
|
||||
when: ansible_facts.distribution_major_version|int >= 8
|
||||
|
||||
- name: Generate parameters.yaml
|
||||
copy:
|
||||
|
@ -26,6 +26,8 @@
|
||||
- name: Configure tripleo repositories
|
||||
include_role:
|
||||
name: tripleo_repos
|
||||
when:
|
||||
- ansible_facts.distribution == 'CentOS'
|
||||
|
||||
- name: Ensure system is up to date
|
||||
yum:
|
||||
@ -46,14 +48,14 @@
|
||||
name: python-tripleoclient
|
||||
state: installed
|
||||
become: true
|
||||
when: ansible_distribution_major_version|int <= 7
|
||||
when: ansible_facts.distribution_major_version|int <= 7
|
||||
|
||||
- name: install python3 tripleoclient
|
||||
package:
|
||||
name: python3-tripleoclient
|
||||
state: present
|
||||
become: true
|
||||
when: ansible_distribution_major_version|int >= 8
|
||||
when: ansible_facts.distribution_major_version|int >= 8
|
||||
|
||||
- name: Copy sample undercloud.conf
|
||||
copy:
|
||||
|
Loading…
Reference in New Issue
Block a user