Skip to content
Permalink
Browse files

Make switching openshift-ansible commits correct

  • Loading branch information...
smarterclayton committed Feb 5, 2017
1 parent a3b8ceb commit 297cabdc07a28eb58f7fbbf16694f6778854f5b9
Showing with 6 additions and 6 deletions.
  1. +6 −6 entrypoint.sh
@@ -6,12 +6,6 @@
#
export PATH=$HOME/google-cloud-sdk/bin:$PATH

if [[ -n "${OPENSHIFT_ANSIBLE_COMMIT-}" ]]; then
pushd /usr/share/ansible/openshift-ansible &>/dev/null
git checkout "${OPENSHIFT_ANSIBLE_COMMIT}" || git fetch origin && git checkout "${OPENSHIFT_ANSIBLE_COMMIT}"
popd &>/dev/null
fi

# When running with an invalid user, correct it by adding cloud-user (also
# part of the image definition). Ansible requires getpwnam() to start.
# Also set the default to localhost to become: no to avoid the need to
@@ -31,6 +25,12 @@ if ! whoami &>/dev/null; then
fi
fi

if [[ -n "${OPENSHIFT_ANSIBLE_COMMIT-}" ]]; then
pushd /usr/share/ansible/openshift-ansible &>/dev/null
git checkout "${OPENSHIFT_ANSIBLE_COMMIT}" || ( git fetch origin && git checkout "${OPENSHIFT_ANSIBLE_COMMIT}" )
popd &>/dev/null
fi

gcloud auth activate-service-account --key-file="${WORK}/playbooks/files/gce.json"

exec "$@"

0 comments on commit 297cabd

Please sign in to comment.
You can’t perform that action at this time.