Created
March 12, 2019 05:07
Star
You must be signed in to star a gist
Piece 10 of Ansibile-create-AWS-environment.yml file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#create a security group for the private subnet which allows restricted access from public subnet | |
- name: create a security group for servers in private subnet with only tcp 3389 incoming | |
ec2_group: | |
state: present | |
name: sg_ansibleVPC_privatesubnet_servers | |
description: security group for private subnet that allows limited access from public subnet | |
vpc_id: "{{ ansibleVPC.vpc.id }}" | |
region: "{{ vpc_region }}" | |
rules: | |
- proto: tcp | |
ports: 3389 | |
group_name: sg_ansibleVPC_publicsubnet_jumphost | |
rule_desc: allow only rdp access from public to private subnet servers | |
register: sg_ansibleVPC_privatesubnet_servers | |
- name: display details for private subnet security group | |
debug: var=sg_ansibleVPC_privatesubnet_servers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment