compass-core/install/ansible.sh
Xicheng Chang 6fcc29479d Add ansible related install scripts
Change-Id: I7ab32df59882eb1bba66e4d613b4fbd72972f3ee
Todo: find out a way to dynamically turn off strict key checking.
2015-04-15 16:19:47 -07:00

26 lines
572 B
Bash
Executable File

#!/bin/bash
#
echo "Installing Ansible"
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source $DIR/install.conf
if [ -f $DIR/env.conf ]; then
source env.conf
else
echo "failed to load environment"
exit 1
fi
source $DIR/install_func.sh
echo "INstalling ansible related packages"
sudo yum -y install ansible
if [[ "$?" != "0" ]]; then
echo "Failed to install ansible"
exit 1
fi
sudo mkdir -p /var/ansible/run
sudo mkdir -p /root/backup/ansible
sudo cp -rn /var/ansible/* /root/backup/ansible/
sudo cp -rf $ADAPTERS_HOME/ansible/* /var/ansible/