Skip to content
This repository was archived by the owner on Aug 29, 2018. It is now read-only.

Commit a87c572

Browse files
committed
Use OpenShift EPEL mirror instead of official EPEL
1 parent 19fc161 commit a87c572

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

lib/vagrant-openshift/action/create_yum_repositories.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,9 @@ def call(env)
5454
sudo(env[:machine], "yum clean all")
5555

5656
unless is_fedora
57-
unless env[:machine].communicate.test("rpm -q epel-release")
58-
sudo(env[:machine], "yum install -y http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm")
59-
60-
#Workaround broken RHEL image which does not recover after restart.
61-
if "VagrantPlugins::AWS::Provider" == env[:machine].provider.class.to_s
62-
remote_write(env[:machine], "/etc/rc.local") {
57+
#Workaround broken RHEL image which does not recover after restart.
58+
if "VagrantPlugins::AWS::Provider" == env[:machine].provider.class.to_s
59+
remote_write(env[:machine], "/etc/rc.local") {
6360
%{#!/bin/sh
6461
#
6562
# This script will be executed *after* all the other init scripts.
@@ -79,7 +76,6 @@ def call(env)
7976
fi
8077
}}
8178
sudo env[:machine], "chmod og+x /etc/rc.local"
82-
end
8379
end
8480
end
8581

lib/vagrant-openshift/action/install_origin_base_dependencies.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ def call(env)
148148
sudo(env[:machine], %{
149149
set -ex
150150
151+
if [[ ! -e /etc/fedora-release ]]; then
152+
curl -s https://mirror.openshift.com/mirror/epel/epel7.repo > /etc/yum.repos.d/epel-openshift.repo
153+
echo 'OS_BUILD_IMAGE_ARGS="--mount /etc/yum.repos.d/epel-openshift.repo:/etc/yum.repos.d/epel.repo"' >> /etc/environment
154+
fi
155+
151156
if [[ -e /etc/redhat-release && ! -e /etc/fedora-release && ! -e /etc/centos-release ]]; then
152157
153158
# create rhaos3.1 and 3.2 repos

0 commit comments

Comments
 (0)