Skip to content

Instantly share code, notes, and snippets.

@nivleshc
Created March 12, 2019 05:18
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/40fbb1af474245e534ac7fb102e36283 to your computer and use it in GitHub Desktop.
Save nivleshc/40fbb1af474245e534ac7fb102e36283 to your computer and use it in GitHub Desktop.
Piece 11 of Ansible-create-AWS-environment.yml file
- name: deploy a windows 2016 server in private subnet
ec2:
key_name: "{{ my_useast1_key }}"
instance_type: t2.micro
image: ami-0bf148826ef491d16
group_id: "{{ sg_ansibleVPC_privatesubnet_servers.group_id }}"
vpc_subnet_id: "{{ private_subnet.subnet.id }}"
assign_public_ip: no
region: "{{ vpc_region }}"
instance_tags:
Name: win2016svr
count_tag:
Name: win2016svr
exact_count: 1
register: win2016svr
- name: display details for windows 2016 server in private subnet
debug: var=win2016svr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment