Reference:
- https://adamcod.es/2014/09/23/vagrant-ansible-quickstart-tutorial.html
- http://www.vagrantbox.es/
- http://www.slideshare.net/williamyeh/ansible-top-down
- https://www.nginx.com/resources/admin-guide/load-balancer/
- http://www.virtualbox.org/manual/ch06.html
- http://www.virtualbox.org/manual/ch06.html#network_internal
- http://docs.ansible.com/ansible/file_module.html
+-----------------------------+
| +---- web01 ----+ |
| lb --| |-- db |
| +---- web02 ----+ |
+-----------------------------+
- lb (10.0.2.15)
- web01 (10.0.2.16)
- web02 (10.0.2.17)
- db (10.0.2.18)
This step is create vm for lb, web01, web02, db with Vagrantfile
- fish shell
$> vagrant destroy -f; and vagrant up
- bash shell
$> vagrant destroy -f && vagrant up
$> curl 192.168.1.200
$> ansible-playbook \
--verbose \
--become \
--user=vagrant \
-i ./hosts playbook.yml
$> vagrant port lb
$> vagrant port web01
$> vagrant port web02
$> vagrant port db
Reference : intro_getting_started
$> ansible all -m ping
or
$> ansible all -m ping -u vagrant
or
$> ansible all -m ping -u vagrant --sudo