February 2018
Intermediate to advanced
200 pages
5h 51m
English
Using recipes from this chapter, we can create and save our playbook as phonebook.yml:
#Playbook for deploying phonebook application in Azure Cloud
---
- hosts: tag_Name_first_vm
gather_facts: no
roles:
- phonebook
We should note that the hosts in this playbook are set as tag_Name_first_vm (Ansible dynamic inventory), which will create an inventory for our phonebook application at runtime. We can execute our playbook using the following command:
$ ansible-playbook -i azure-rm.py --become phonebook.yml
We used a command-line inventory argument for our playbook, since we are creating our resources in the playbook itself. After successful completion of this playbook, we will be able to access our application on port 8000 and ...
Read now
Unlock full access