Amazon VPC

All the work for creating the underlying network was completed in the previous chapter, meaning that we simply need to copy the elb, gateway, securitygroups, subnets, and vpc folders from your previous playbook across to your current roles folder.

Once copied, update the site.yml file so it reads:

- name: Create and configure an Amazon VPC  hosts: localhost  connection: local  gather_facts: True  vars_files:    - group_vars/common.yml  roles:    - roles/vpc    - roles/subnets    - roles/gateway    - roles/securitygroups    - roles/elb

Also, add the following to the group_vars/common.yml file:

---# the common variablesenvironment_name: "wordpress"ec2_region: "eu-west-1"

Finally, we need to update the subnets that are being created; to do this, update ...

Get Learn Ansible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.