Ansible – reviewing the code and deploying our infrastructure
While we have covered Terraform in detail in this chapter, we will only quickly review the Ansible code here as we will go into a lot more detail on an Ansible deployment in the next chapter, Chapter 5, Deploying to Amazon Web Services.
Like Terraform, the Ansible code is split into roles; this makes our site.yml
file look like the following:
- name: Deploy and configure the Azure Environment hosts: localhost connection: local gather_facts: true vars_files: - group_vars/azure.yml - group_vars/common.yml roles: - roles/create-randoms - roles/azure-rg - roles/azure-virtualnetwork - roles/azure-storage - roles/azure-mysql - roles/azure-vm-admin ...