44 lines
792 B
Markdown
44 lines
792 B
Markdown
# demoAnsible
|
|
|
|
## Setup
|
|
|
|
- Install vagrant
|
|
- Install ansible
|
|
- Install Virtualbox (if libvirt provider is not used)
|
|
|
|
> Start the VMs using vagrant
|
|
|
|
```bash
|
|
# Choose between libvirt and virtualbox depending on your provider
|
|
cd vagrant/libvirt
|
|
cd vagrant/virtualbox
|
|
|
|
# Start the VMs
|
|
vagant up
|
|
# Check that the VM are up
|
|
# Check that you can login using ssh (ssh vagrant@192.168.56.141 # password: vagrant)
|
|
```
|
|
|
|
## Demo 1
|
|
|
|
- Run the playbook (verify that playbook parameters match your VMs)
|
|
|
|
```bash
|
|
ansible-playbook playbook.yml -i hosts
|
|
```
|
|
|
|
Try to access http://192.168.56.141/index.php
|
|
|
|
## Demo 2
|
|
|
|
- Kill the VMs and remove them.
|
|
- Use vagrant to recreate them from scratch
|
|
|
|
- Run the playbook
|
|
|
|
```bash
|
|
ansible-playbook site.yml -i hosts
|
|
```
|
|
|
|
Try to access http://192.168.56.141/index.php
|