Skip to content

Commit

Permalink
shfmt changes and adding fixing redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
neelimamukiri committed Jun 6, 2017
1 parent ec4e072 commit e7f419a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
10 changes: 5 additions & 5 deletions install/ansible/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ env_file=install/ansible/env.json
# Verify ansible can reach all hosts

echo "Verifying ansible reachability"
ansible all -vvv $ans_opts -i $host_inventory -m setup -a 'filter=ansible_distribution*' >&$inventory_log
if [ !egrep 'FAIL|UNREACHABLE' $inventory_log >&/dev/null ]; then
ansible all -vvv $ans_opts -i $host_inventory -m setup -a 'filter=ansible_distribution*' | tee $inventory_log
if [ egrep 'FAIL|UNREACHABLE' $inventory_log > /dev/null ]; then
echo "WARNING Some of the hosts are not accessible via passwordless SSH"
echo " "
echo "This means either the host is unreachable or passwordless SSH is not"
Expand Down Expand Up @@ -146,7 +146,7 @@ echo "Installing Contiv"
# Always install the base, install the scheduler stack/etcd if required
echo '- include: install_base.yml' >$ansible_path/install_plays.yml

if [ "$install_scheduler" == "true" ] ; then
if [ "$install_scheduler" == "true" ]; then
echo '- include: install_docker.yml' >>$ansible_path/install_plays.yml
echo '- include: install_etcd.yml' >>$ansible_path/install_plays.yml
echo '- include: install_scheduler.yml' >>$ansible_path/install_plays.yml
Expand All @@ -156,7 +156,7 @@ else
fi
fi
# Install contiv & API Proxy
if [ "$contiv_v2plugin_install" == "true" ] ; then
if [ "$contiv_v2plugin_install" == "true" ]; then
echo '- include: install_v2plugin.yml' >>$ansible_path/install_plays.yml
echo '- include: install_auth_proxy.yml' >>$ansible_path/install_plays.yml
else
Expand Down Expand Up @@ -200,7 +200,7 @@ if [ "$unreachable" = "" ] && [ "$failed" = "" ]; then
echo " For example, netctl net create -t default --subnet=20.1.1.0/24 default-net"
echo " "
echo "========================================================="
exit 0
exit 0
else
echo "Installation failed"
echo "========================================================="
Expand Down
7 changes: 3 additions & 4 deletions install/ansible/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ env_file=install/ansible/env.json
# Verify ansible can reach all hosts

echo "Verifying ansible reachability"
ansible all $ans_opts -i $host_inventory -m setup -a 'filter=ansible_distribution*' >&$inventory_log
egrep 'FAIL|UNREACHABLE' $inventory_log >&/dev/null
if [ $? -eq 0 ]; then
ansible all -vvv $ans_opts -i $host_inventory -m setup -a 'filter=ansible_distribution*' | tee $inventory_log
if [ egrep 'FAIL|UNREACHABLE' $inventory_log > /dev/null ]; then
echo "WARNING Some of the hosts are not accessible via passwordless SSH"
echo " "
echo "This means either the host is unreachable or passwordless SSH is not"
Expand Down Expand Up @@ -187,7 +186,7 @@ set +x

if [ "$unreachable" = "" ] && [ "$failed" = "" ]; then
echo "Uninstallation is complete"
exit 0
exit 0
else
echo "Uninstallation failed"
echo "========================================================="
Expand Down
1 change: 0 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ etcd_version=${CONTIV_ETCD_VERSION:-v2.3.8}
# independent of $contiv_version above.
v2plugin_version=${CONTIV_V2PLUGIN_VERSION:-"1.0.0"}


function usage() {
echo "Usage:"
echo "./release.sh -a <ACI gateway image> -c <contiv version> -e <etcd version> -p <API proxy image version> "
Expand Down
4 changes: 2 additions & 2 deletions scripts/get_latest_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ if [[ "$releases" != *"browser_download_url"* ]]; then
if [[ "$releases" != *"browser_download_url"* ]]; then
exit 1
fi
release=$(echo "$releases" | python -c 'import json, sys;print json.load(sys.stdin)[0]["name"]')
release=$(echo "$releases" | python -c 'import json, sys;print json.load(sys.stdin)[0]["name"]')
else
release=$(echo "$releases" | python -c 'import json, sys;print json.load(sys.stdin)["name"]')
release=$(echo "$releases" | python -c 'import json, sys;print json.load(sys.stdin)["name"]')
fi
echo $release

0 comments on commit e7f419a

Please sign in to comment.