Skip to content

Instantly share code, notes, and snippets.

@nivleshc
Created March 12, 2019 04:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nivleshc/30e334e0cd53aa392a9e69e18e2b661b to your computer and use it in GitHub Desktop.
Save nivleshc/30e334e0cd53aa392a9e69e18e2b661b to your computer and use it in GitHub Desktop.
Piece 8 of Ansible-create-AWS-environment.yml file
- name: create a security group for jumphosts
ec2_group:
state: present
name: sg_ansibleVPC_publicsubnet_jumphost
description: security group for jumphosts within the public subnet of ansible VPC
vpc_id: "{{ ansibleVPC.vpc.id }}"
region: "{{ vpc_region }}"
rules:
- proto: tcp
ports:
- 3389
cidr_ip: 0.0.0.0/0
rule_desc: allow rdp to jumphost
register: sg_ansibleVPC_publicsubnet_jumphost
- name: display details for jumphost security group
debug: var=sg_ansibleVPC_publicsubnet_jumphost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment