These are the steps we will be following.
Install vagrant
and virtualbox
.
Clone the repo via git clone https://github.com/CPT-DevOps/AnsibleWorkshop.git' Goto the directory
cd AnsibleWorkshop`
git checkout tags/Lab01
vagrant up
vagrant ssh ansible
/vagrant/install_ansible.sh
exit
git checkout tags/Lab02
vagrant up
vagrant ssh ansible
cd /ansible
ansible -i dev all -m ping
-> this will error due to permissions
ansible-playbook -i dev bootstrap.yml --ask-pass --ask-su-pass --user=vagrant
ansible -i dev all -m ping
-> this will now work
git checkout tags/Lab03
vagrant up
cd /ansible/
ansible-galaxy install jdauphant.nginx --roles-path=roles
ansible-playbook -i dev site.yml
git checkout tags/Lab04
vagrant up
cd /ansible/
ansible-playbook -i dev site.yml