mirror of
https://github.com/trailofbits/algo.git
synced 2025-07-25 06:53:00 +02:00
31 lines
992 B
YAML
31 lines
992 B
YAML
---
|
|
- name: Build python virtual environment
|
|
ansible.builtin.import_tasks: venv.yml
|
|
|
|
- name: Include prompts
|
|
ansible.builtin.import_tasks: prompts.yml
|
|
|
|
- name: Locate official AMI for region
|
|
amazon.aws.ec2_ami_info:
|
|
aws_access_key: "{{ access_key }}"
|
|
aws_secret_key: "{{ secret_key }}"
|
|
owners: "{{ cloud_providers.ec2.image.owner }}"
|
|
region: "{{ algo_region }}"
|
|
filters:
|
|
architecture: "{{ cloud_providers.ec2.image.arch }}"
|
|
name: ubuntu/images/hvm-ssd/{{ cloud_providers.ec2.image.name }}-*64-server-*
|
|
register: ami_search
|
|
|
|
- name: Set the ami id as a fact
|
|
ansible.builtin.set_fact:
|
|
ami_image: "{{ (ami_search.images | sort(attribute='creation_date') | last)['image_id'] }}"
|
|
|
|
- name: Deploy the stack
|
|
ansible.builtin.import_tasks: cloudformation.yml
|
|
|
|
- name: Set facts
|
|
ansible.builtin.set_fact:
|
|
cloud_instance_ip: "{{ stack.stack_outputs.ElasticIP }}"
|
|
ansible_ssh_user: algo
|
|
ansible_ssh_port: "{{ ssh_port }}"
|
|
cloudinit: true
|