mirror of
https://github.com/trailofbits/algo.git
synced 2025-06-05 22:54:01 +02:00
EC2 eip facts authentication fix (#1454)
* EC2 eip facts authentication fix * add region to ec2_eip_facts
This commit is contained in:
parent
98f89adeba
commit
c27aed708a
2 changed files with 11 additions and 7 deletions
|
@ -6,13 +6,6 @@
|
|||
- name: Include prompts
|
||||
import_tasks: prompts.yml
|
||||
|
||||
- set_fact:
|
||||
algo_region: >-
|
||||
{% if region is defined %}{{ region }}
|
||||
{%- elif _algo_region.user_input %}{{ aws_regions[_algo_region.user_input | int -1 ]['region_name'] }}
|
||||
{%- else %}{{ aws_regions[default_region | int - 1]['region_name'] }}{% endif %}
|
||||
stack_name: "{{ algo_server_name | replace('.', '-') }}"
|
||||
|
||||
- name: Locate official AMI for region
|
||||
ec2_ami_facts:
|
||||
aws_access_key: "{{ access_key }}"
|
||||
|
|
|
@ -54,9 +54,20 @@
|
|||
register: _algo_region
|
||||
when: region is undefined
|
||||
|
||||
- name: Set algo_region and stack_name facts
|
||||
set_fact:
|
||||
algo_region: >-
|
||||
{% if region is defined %}{{ region }}
|
||||
{%- elif _algo_region.user_input %}{{ aws_regions[_algo_region.user_input | int -1 ]['region_name'] }}
|
||||
{%- else %}{{ aws_regions[default_region | int - 1]['region_name'] }}{% endif %}
|
||||
stack_name: "{{ algo_server_name | replace('.', '-') }}"
|
||||
|
||||
- block:
|
||||
- name: Get existing available Elastic IPs
|
||||
ec2_eip_facts:
|
||||
aws_access_key: "{{ access_key }}"
|
||||
aws_secret_key: "{{ secret_key }}"
|
||||
region: "{{ algo_region }}"
|
||||
register: raw_eip_addresses
|
||||
|
||||
- set_fact:
|
||||
|
|
Loading…
Add table
Reference in a new issue