On a machine you can clone code using Git
-
Create a folder where we'll pull in code
mkdir vagrant-ansible cd vagrant-ansible
-
Clone the following
git clone -b renoirb/QA-89 [email protected]:AlayaCare/cloud-ansible.git git clone -b feature/QA-89 [email protected]:AlayaCare/integration-testing.git ## ... git submodule in folders above. (No pip install) git clone [email protected]:AlayaCare/api.base.git base
-
Copy Vagrantfile and patch
curl -o Vagrantfile https://gist.githubusercontent.com/renoirb/614f9cdf68aa70af0b17b4fb321e9ed0/raw/Vagrantfile curl -o vagrant.setup.sh https://gist.githubusercontent.com/renoirb/614f9cdf68aa70af0b17b4fb321e9ed0/raw/vagrant.setup.sh
-
Adjust
cloud-ansible/ansible.cfg
diff --git a/ansible.cfg b/ansible.cfg index 7c58e21..abb676b 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,6 +1,6 @@ [defaults] host_key_checking = False -roles_path = ./roles +roles_path = /vagrant/cloud-ansible/roles allow_world_readable_tmpfiles = True host_key_checking = False
-
Vagrant up!
vagrant up
-
You have AlayaCare app running locally, right? (dignhy?)
-
In the VM, run ansible
vagrant ssh ansible-playbook /vagrant/cloud-ansible/playbooks/integration-testing.yml
-
Exit the VM (lots of thing should have happened, we need new shell environment)
vagrant ssh cd /vagrant/integration-testing make test
-
You should be able to run tests
Other useful Ansible commands to keep a copy somewhere.
Basically
ansible -m moduleName
where moduleName is a module