I am using vagrant 1.6.2 and using it with an ubuntu 14.04 box. When I do vagrant provision
it runs an .sh
script.
#!/usr/bin/env bash
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get install -y make git-core
if [[ ! -d /home/vagrant/ansible ]]; then
# Install Ansible dependencies.
apt-get install -y python-mysqldb python-yaml python-jinja2 python-paramiko sshpass
# Checkout the Ansible repository.
git clone https://github.com/ansible/ansible.git /home/vagrant/ansible
mkdir /etc/ansible
echo "localhost" > /etc/ansible/hosts
source /home/vagrant/ansible/hacking/env-setup
echo "source /home/vagrant/ansible/hacking/env-setup" >> /home/vagrant/.bashrc
fi
cd /home/vagrant/me/provisioning
ansible playbook.yml
But I get the message /tmp/vagrant-shell: line 24: ansible: command not found
But when I go into the box and type ansible
it does work.
How can I make it work through my .sh
file?
Thanks