In order to use Ansible roles you first have to install Ansible. You can install Ansible using the install_ansible script or using sudo apt-get install ansible. To run the roles you just need to excute the playbook. You can test the ansible roles using a dry test or test it inside a VM.
(gives script excute permissions)
- Type chmod +x install_ansible.sh
- Type ./install_ansible.sh to run
(gives script excute permissions)
- Type chmod +x install_ansible_container.sh
- Type ./install_ansible_container.sh to run
- sudo apt-get install software-properties-common
- sudo apt-add-repository ppa:ansible/ansible
- sudo apt-get update
- sudo apt-get install ansible
- sudo apt-get install python-pip python-dev build-essential
- sudo pip install --upgrade pip
- sudo pip install ansible-container[docker]
To run the playbook simply execute the following command:
- ansible-playbook -K -c local -i inventory playbook.yml
- ansible-playbook -K -c local -i inventory playbook.yml --check
First you need to install VirtualBox using the sudo apt-get install virtualbox command. You can either run the playbook or go to here to download and install vargrant.
- chmod +x testAnsibleInVagrant.sh
- ./testAnsibleInVagrant.sh
- chmod +x testAnsibleInVagrantExistingVM.sh
- ./testAnsibleInVagrantExistingVM.sh
- Use the ansible-container build command