Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 13 additions & 23 deletions ansible/windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,8 @@ then
echo ubuntu:ubuntu | chpasswd
fi

if [ "$CHECK_ANSIBLE" == "/usr/bin/ansible" ]
if [ "$CHECK_ANSIBLE" != "/usr/bin/ansible" ]
then
# Setup Ansible for Local Use and Run
cp /vagrant/ansible/inventory/vagrant /etc/ansible/hosts -f
chmod 666 /etc/ansible/hosts
if [ "$VERSION_UBUNTU" == "16.04" ]
then
cat /etc/ssh/ssh_host_rsa_key.pub >> /home/ubuntu/.ssh/authorized_keys
else
cat /etc/ssh/ssh_host_rsa_key.pub >> /home/vagrant/.ssh/authorized_keys
fi
sudo ansible-playbook /vagrant/ansible/playbook_vagrant.yml -e hostname=$1 --connection=local #-vvv
else
# Update Repositories
if [ "$VERSION_UBUNTU" == "14.04" ]
then
Expand All @@ -45,14 +34,15 @@ else
sudo apt-get update
sudo apt-get install -y ansible --allow-unauthenticated
sudo ansible-galaxy install -r /vagrant/ansible/requirements.yml
# Setup Ansible for Local Use and Run
cp /vagrant/ansible/inventory/vagrant /etc/ansible/hosts -f
chmod 666 /etc/ansible/hosts
if [ "$VERSION_UBUNTU" == "16.04" ]
then
cat /etc/ssh/ssh_host_rsa_key.pub >> /home/ubuntu/.ssh/authorized_keys
else
cat /etc/ssh/ssh_host_rsa_key.pub >> /home/vagrant/.ssh/authorized_keys
fi
sudo ansible-playbook /vagrant/ansible/playbook_vagrant.yml -e hostname=$1 --connection=local #-vvv
fi
fi

# Setup Ansible for Local Use and Run
cp /vagrant/ansible/inventory/vagrant /etc/ansible/hosts -f
chmod 666 /etc/ansible/hosts
if [ "$VERSION_UBUNTU" == "16.04" ]
then
cat /etc/ssh/ssh_host_rsa_key.pub >> /home/ubuntu/.ssh/authorized_keys
else
cat /etc/ssh/ssh_host_rsa_key.pub >> /home/vagrant/.ssh/authorized_keys
fi
sudo ansible-playbook /vagrant/ansible/playbook_vagrant.yml -e hostname=$1 --connection=local #-vvv