summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/tasks
diff options
context:
space:
mode:
authorOpenShift Bot <eparis+openshiftbot@redhat.com>2017-06-14 16:10:54 -0400
committerGitHub <noreply@github.com>2017-06-14 16:10:54 -0400
commit4f129045b3f3c1b22203a7ab68cda15ee4b8d87b (patch)
treecad723b79faa4dfc78c7f3cb73d871e9f4ab95a3 /roles/openshift_facts/tasks
parentcf81c53e8b747603ba6599f8c9fbdf50feff4c88 (diff)
parent843054c16735da4c292707a5c0cdd28a69df50e5 (diff)
downloadopenshift-4f129045b3f3c1b22203a7ab68cda15ee4b8d87b.tar.gz
openshift-4f129045b3f3c1b22203a7ab68cda15ee4b8d87b.tar.bz2
openshift-4f129045b3f3c1b22203a7ab68cda15ee4b8d87b.tar.xz
openshift-4f129045b3f3c1b22203a7ab68cda15ee4b8d87b.zip
Merge pull request #4179 from sosiouxme/20170512-singletonize-slow-stuff
Merged by openshift-bot
Diffstat (limited to 'roles/openshift_facts/tasks')
-rw-r--r--roles/openshift_facts/tasks/main.yml23
1 files changed, 19 insertions, 4 deletions
diff --git a/roles/openshift_facts/tasks/main.yml b/roles/openshift_facts/tasks/main.yml
index 1b9bda67e..50ed3e964 100644
--- a/roles/openshift_facts/tasks/main.yml
+++ b/roles/openshift_facts/tasks/main.yml
@@ -24,12 +24,18 @@
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
+ when:
+ - ansible_distribution == 'Fedora'
+ - ansible_python['version']['major'] != 3
+ - r_openshift_facts_ran is not defined
- name: Validate python version
fail:
msg: "openshift-ansible requires Python 2 for {{ ansible_distribution }}"
- when: ansible_distribution != 'Fedora' and ansible_python['version']['major'] != 2
+ when:
+ - ansible_distribution != 'Fedora'
+ - ansible_python['version']['major'] != 2
+ - r_openshift_facts_ran is not defined
# Fail as early as possible if Atomic and old version of Docker
- block:
@@ -48,7 +54,9 @@
that:
- l_atomic_docker_version.stdout | replace('"', '') | version_compare('1.12','>=')
- when: l_is_atomic | bool
+ when:
+ - l_is_atomic | bool
+ - r_openshift_facts_ran is not defined
- name: Load variables
include_vars: "{{ item }}"
@@ -59,7 +67,9 @@
- name: Ensure various deps are installed
package: name={{ item }} state=present
with_items: "{{ required_packages }}"
- when: not l_is_atomic | bool
+ when:
+ - not l_is_atomic | bool
+ - r_openshift_facts_ran is not defined
- name: Ensure various deps for running system containers are installed
package: name={{ item }} state=present
@@ -67,6 +77,7 @@
when:
- not l_is_atomic | bool
- l_any_system_container | bool
+ - r_openshift_facts_ran is not defined
- name: Gather Cluster facts and set is_containerized if needed
openshift_facts:
@@ -99,3 +110,7 @@
- name: Set repoquery command
set_fact:
repoquery_cmd: "{{ 'dnf repoquery --latest-limit 1 -d 0' if ansible_pkg_mgr == 'dnf' else 'repoquery --plugins' }}"
+
+- name: Register that this already ran
+ set_fact:
+ r_openshift_facts_ran: True