summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-02-17 17:17:35 -0500
committerGitHub <noreply@github.com>2017-02-17 17:17:35 -0500
commit701bd042f01df17d3363c8c31755eafabcf21fa7 (patch)
tree0ca49ebe73fc00d3119ca39db97fdd617e3f8bf6 /roles
parent31eabf5d41c706270a347fad676cb74288aa5813 (diff)
parent33eecf128912879e41ce63cf0d40bf716999b641 (diff)
downloadopenshift-701bd042f01df17d3363c8c31755eafabcf21fa7.tar.gz
openshift-701bd042f01df17d3363c8c31755eafabcf21fa7.tar.bz2
openshift-701bd042f01df17d3363c8c31755eafabcf21fa7.tar.xz
openshift-701bd042f01df17d3363c8c31755eafabcf21fa7.zip
Merge pull request #3402 from cgwalters/fedora-python3
facts/main: Require Python 3 for Fedora, Python 2 everywhere else
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_facts/tasks/main.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/openshift_facts/tasks/main.yml b/roles/openshift_facts/tasks/main.yml
index 9a1982076..0ec294bbc 100644
--- a/roles/openshift_facts/tasks/main.yml
+++ b/roles/openshift_facts/tasks/main.yml
@@ -14,6 +14,18 @@
l_is_master_system_container: "{{ (use_master_system_container | default(use_system_containers) | bool) }}"
l_is_etcd_system_container: "{{ (use_etcd_system_container | default(use_system_containers) | bool) }}"
+- name: Validate python version
+ fail:
+ msg: |
+ openshift-ansible requires Python 3 for {{ ansible_distribution }};
+ For information on enabling Python 3 with Ansible, see https://docs.ansible.com/ansible/python_3_support.html
+ when: ansible_distribution == 'Fedora' and ansible_python['version']['major'] != 3
+
+- name: Validate python version
+ fail:
+ msg: "openshift-ansible requires Python 2 for {{ ansible_distribution }}"
+ when: ansible_distribution != 'Fedora' and ansible_python['version']['major'] != 2
+
- name: Ensure various deps are installed
package: name={{ item }} state=present
with_items: "{{ required_packages }}"