looking for script to create custom vpc with public and private subnet and deploy rds on private subnet

11 views
Skip to first unread message

karthick selvam

unread,
May 3, 2018, 6:08:33 PM5/3/18
to Ansible Project
---
- hosts: all
  connection: local
  gather_facts: no
  tasks:
  - ec2_vpc:
        state: present
        cidr_block: 172.22.0.0/16
        resource_tags: { "Environment":"Development" }
        subnets:
          - cidr: 172.22.1.0/24
            az: ap-south-1a
            resource_tags: { "Environment":"Dev", "Tier" : "Web" }
          - cidr: 172.22.2.0/24
            az: ap-south-1b
            resource_tags: { "Environment":"Dev", "Tier" : "App" }
        internet_gateway: True
        route_tables:
          - subnets:
              - 172.22.1.0/24
            routes:
              - dest: 0.0.0.0/0
                gw: igw
        region: ap-south-1
    register: vpc

Arbab Nazar

unread,
May 5, 2018, 12:56:14 AM5/5/18
to Ansible Project
Please use this as reference: https://github.com/arbabnazar/ansible-aws-roles, hope you will get all the desired information
Reply all
Reply to author
Forward
0 new messages