Skip to content

Commit

Permalink
Fixes for Azure in repository role hitachienergy#536
Browse files Browse the repository at this point in the history
  • Loading branch information
to-bar committed Oct 8, 2019
1 parent 3f6f059 commit 3445fdf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

REPOSITORY_URL=$1

curl -I -L $REPOSITORY_URL | grep "HTTP/1.1 200 OK"
CURL_CMD="curl --head --location --connect-timeout 30 --silent --show-error $REPOSITORY_URL"
CURL_OUTPUT=$($CURL_CMD 2>&1) || { echo "Command failed: $CURL_CMD"; echo "Output was: $CURL_OUTPUT"; exit 2; }

egrep 'HTTP/.{1,3} 200 OK' <<< "$CURL_OUTPUT" || { echo "HTTP 200 status code not found"; exit 3; }

cat << EOF > /etc/yum.repos.d/epirepo.repo
[epirepo]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ mod_ssl
yum-utils

[packages]
audit # for docker-ce
audit-libs # for docker-ce
bash-completion
ca-certificates
cifs-utils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ mod_ssl
yum-utils

[packages]
audit # for docker-ce
audit-libs # for docker-ce
bash-completion
ca-certificates
cifs-utils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ fi
setenforce 0
systemctl start httpd

createrepo $EPI_REPO_SERVER_PATH/packages
createrepo $EPI_REPO_SERVER_PATH/packages

if systemctl is-active firewalld; then
firewall-cmd --permanent --add-service=http
firewall-cmd --reload
fi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Create epirepo repository
shell: >-
/tmp/epi-repository-setup-scripts/create-repository.sh /var/www/html/epirepo {{ offline_mode }} |&
set -o pipefail && /tmp/epi-repository-setup-scripts/create-repository.sh /var/www/html/epirepo {{ offline_mode }} |&
tee /tmp/epi-repository-setup-scripts/create-repository.log
when:
- not custom_repository_url
Expand All @@ -15,5 +15,5 @@
shell: /tmp/epi-repository-setup-scripts/disable-system-repos.sh
- name: Add and enable epirepo
shell: >-
/tmp/epi-repository-setup-scripts/add-epirepo-client.sh {{ repository_url }} |&
set -o pipefail && /tmp/epi-repository-setup-scripts/add-epirepo-client.sh {{ repository_url }} |&
tee /tmp/epi-repository-setup-scripts/add-epirepo-client.log

0 comments on commit 3445fdf

Please sign in to comment.