Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 33 lines (23 sloc) 864 Bytes
#!/usr/bin/env bash
set -e
function _logger(){
sep='======================================================================='
printf "\n%s %s\n\n" "${1}" "${sep:${#1}}"
}
_logger "Set Proxy if Available..."
if [[ "${http_proxy}" ]]; then
if ! grep -q proxy /etc/yum.conf; then
echo "proxy=${http_proxy}" >> /etc/yum.conf
fi
fi
_logger "Install Ansible Dependency Packages..."
sudo -E yum install -y gcc python python-devel libffi-devel openssl-devel
_logger "Install Pip..."
curl -fsSL "https://bootstrap.pypa.io/get-pip.py" | sudo -E python
_logger "Install Ansible..."
sudo -E pip install ansible
_logger "Downloading playbook..."
curl -fsSL "https://raw.githubusercontent.com/IMOKURI/dotfiles/master/setup.yaml" -o ~/.setup.yaml
_logger "Run Ansible Playbook..."
ansible-playbook ~/.setup.yaml --tags "initialize,deploy"
_logger "Finished!"