Book Image

AWS Networking Cookbook

By : Satyajit Das, Jhalak Modi
Book Image

AWS Networking Cookbook

By: Satyajit Das, Jhalak Modi

Overview of this book

This book starts with practical recipes on the fundamentals of cloud networking and gradually moves on to configuring networks and implementing infrastructure automation. This book then supplies in-depth recipes on networking components like Network Interface, Internet Gateways, DNS, Elastic IP addresses, and VPN CloudHub. Later, this book also delves into designing, implementing, and optimizing static and dynamic routing architectures, multi-region solutions, and highly available connectivity for your enterprise. Finally, this book will teach you to troubleshoot your VPC's network, increasing your VPC's efficiency. By the end of this book, you will have advanced knowledge of AWS networking concepts and technologies and will have mastered implementing infrastructure automation and optimizing your VPC.
Table of Contents (10 chapters)

Creating Ansible playbooks for creating VPC

We will be creating Ansible playbooks for managing VPC.

How to do it...

The following are the steps for creating Ansible playbooks:

  1. Create a new playbook. The folder structure will be as follows:
[root@ansible ~ ]# cd /etc/ansible/
[root@ansible ansible]# mkdir playbook
[root@ansible ansible]# mkdir playbook/roles
[root@ansible ansible]# mkdir playbook/roles/vpc
[root@ansible ansible]# mkdir playbook/roles/vpc/{defaults,tasks}
[root@ansible ansible]# cd playbook
  1. Create the configuration file in the playbook folder awsvpc.yml.
[root@ansible playbook]# vim awsvpc.yml
---
- name: Create VPC
hosts: localhost
gather_facts: no
roles:
- vpc
    1. Create a file inventory in playbook folder and...