-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
26 lines (21 loc) · 837 Bytes
/
setup.sh
File metadata and controls
26 lines (21 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
export PYTHONUNBUFFERED=1
export ANSIBLE_FORCE_COLOR=1
if [ $(dpkg-query -W -f='${Status}' ansible 2>/dev/null | grep -c "ok installed") -eq 0 ];
then
echo "Add APT repositories"
export DEBIAN_FRONTEND=noninteractive
apt-get install -qq software-properties-common &> /dev/null || exit 1
apt-add-repository ppa:ansible/ansible &> /dev/null || exit 1
apt-get update -qq
echo "Installing Ansible"
apt-get install -qq ansible &> /dev/null || exit 1
echo "Ansible installed"
fi
cd /vagrant/provisioning
#move ansible inventory hosts file into default location
mkdir -p /etc/ansible/
cp development /etc/ansible/development
#undo executable bits on synced files since ansible gets grumpy
chmod -X /etc/ansible/development
ansible-playbook -i /etc/ansible/development playbook.yml -vv