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

Commit

Permalink
Use OpenShift EPEL mirror instead of official EPEL
Browse files Browse the repository at this point in the history
  • Loading branch information
mfojtik committed Oct 13, 2016
1 parent 19fc161 commit a87c572
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/vagrant-openshift/action/create_yum_repositories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,9 @@ def call(env)
sudo(env[:machine], "yum clean all")

unless is_fedora
unless env[:machine].communicate.test("rpm -q epel-release")
sudo(env[:machine], "yum install -y http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm")

#Workaround broken RHEL image which does not recover after restart.
if "VagrantPlugins::AWS::Provider" == env[:machine].provider.class.to_s
remote_write(env[:machine], "/etc/rc.local") {
#Workaround broken RHEL image which does not recover after restart.
if "VagrantPlugins::AWS::Provider" == env[:machine].provider.class.to_s
remote_write(env[:machine], "/etc/rc.local") {
%{#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
Expand All @@ -79,7 +76,6 @@ def call(env)
fi
}}
sudo env[:machine], "chmod og+x /etc/rc.local"
end
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ def call(env)
sudo(env[:machine], %{
set -ex
if [[ ! -e /etc/fedora-release ]]; then
curl -s https://mirror.openshift.com/mirror/epel/epel7.repo > /etc/yum.repos.d/epel-openshift.repo
echo 'OS_BUILD_IMAGE_ARGS="--mount /etc/yum.repos.d/epel-openshift.repo:/etc/yum.repos.d/epel.repo"' >> /etc/environment
fi
if [[ -e /etc/redhat-release && ! -e /etc/fedora-release && ! -e /etc/centos-release ]]; then
# create rhaos3.1 and 3.2 repos
Expand Down

0 comments on commit a87c572

Please sign in to comment.