From bda194adb97ba2bc9b45e91b35ff393378095ea6 Mon Sep 17 00:00:00 2001
From: Ian Wienand <iwienand@redhat.com>
Date: Wed, 18 May 2016 10:42:56 +1000
Subject: [PATCH] Skip EPEL & RDO install for CI nodes

If the nodepool info file is around, assume we're on a OpenStack CI
node and skip re-installing EPEL & RDO

Change-Id: Ife80af015b26514098e0633f568e3da35b9eea8c
---
 stack.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/stack.sh b/stack.sh
index 21f7f35f35..9944d6de9e 100755
--- a/stack.sh
+++ b/stack.sh
@@ -335,6 +335,13 @@ fi
 # to speed things up
 SKIP_EPEL_INSTALL=$(trueorfalse False SKIP_EPEL_INSTALL)
 
+# If we have /etc/nodepool/provider assume we're on a OpenStack CI
+# node, where EPEL is already pointing at our internal mirror and RDO
+# is pre-installed.
+if [[ -f /etc/nodepool/provider ]]; then
+    SKIP_EPEL_INSTALL=True
+fi
+
 if is_fedora && [[ $DISTRO == "rhel7" ]] && \
         [[ ${SKIP_EPEL_INSTALL} != True ]]; then
     _install_epel_and_rdo