mirror of
https://github.com/trailofbits/algo.git
synced 2025-06-05 22:54:01 +02:00
move to Elastic IP (#512)
This commit is contained in:
parent
9f698fdd68
commit
6f170982aa
2 changed files with 12 additions and 8 deletions
|
@ -26,7 +26,7 @@
|
|||
|
||||
- name: Add new instance to host group
|
||||
add_host:
|
||||
hostname: "{{ stack.stack_outputs.PublicIP }}"
|
||||
hostname: "{{ stack.stack_outputs.ElasticIP }}"
|
||||
groupname: vpn-host
|
||||
ansible_ssh_user: ubuntu
|
||||
ansible_python_interpreter: "/usr/bin/python2.7"
|
||||
|
@ -35,7 +35,7 @@
|
|||
ipv6_support: yes
|
||||
|
||||
- set_fact:
|
||||
cloud_instance_ip: "{{ stack.stack_outputs.PublicIP }}"
|
||||
cloud_instance_ip: "{{ stack.stack_outputs.ElasticIP }}"
|
||||
|
||||
- name: Get EC2 instances
|
||||
ec2_remote_facts:
|
||||
|
|
|
@ -36,7 +36,7 @@ Resources:
|
|||
Type: AWS::EC2::Subnet
|
||||
Properties:
|
||||
CidrBlock: {{ ec2_vpc_nets.subnet_cidr }}
|
||||
MapPublicIpOnLaunch: true
|
||||
MapPublicIpOnLaunch: false
|
||||
Tags:
|
||||
- Key: Environment
|
||||
Value: Algo
|
||||
|
@ -184,9 +184,13 @@ Resources:
|
|||
- Key: Environment
|
||||
Value: Algo
|
||||
|
||||
Outputs:
|
||||
PublicIP:
|
||||
Value:
|
||||
Fn::GetAtt:
|
||||
ElasticIP:
|
||||
Type: AWS::EC2::EIP
|
||||
Properties:
|
||||
InstanceId: !Ref EC2Instance
|
||||
DependsOn:
|
||||
- EC2Instance
|
||||
- PublicIp
|
||||
|
||||
Outputs:
|
||||
ElasticIP:
|
||||
Value: !Ref ElasticIP
|
||||
|
|
Loading…
Add table
Reference in a new issue