mirror of https://github.com/trailofbits/algo
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
- block:
|
|
- name: Include prompts
|
|
import_tasks: prompts.yml
|
|
|
|
- name: Network configured
|
|
gce_net:
|
|
name: "algo-net-{{ algo_server_name }}"
|
|
fwname: "algo-net-{{ algo_server_name }}-fw"
|
|
allowed: "udp:500,4500,{{ wireguard_port }};tcp:22"
|
|
state: "present"
|
|
mode: auto
|
|
src_range: 0.0.0.0/0
|
|
service_account_email: "{{ service_account_email }}"
|
|
credentials_file: "{{ credentials_file_path }}"
|
|
project_id: "{{ project_id }}"
|
|
|
|
- name: "Creating a new instance..."
|
|
gce:
|
|
instance_names: "{{ algo_server_name }}"
|
|
zone: "{{ algo_region }}"
|
|
machine_type: "{{ cloud_providers.gce.size }}"
|
|
image: "{{ cloud_providers.gce.image }}"
|
|
service_account_email: "{{ service_account_email }}"
|
|
credentials_file: "{{ credentials_file_path }}"
|
|
project_id: "{{ project_id }}"
|
|
metadata: '{"ssh-keys":"ubuntu:{{ ssh_public_key_lookup }}"}'
|
|
network: "algo-net-{{ algo_server_name }}"
|
|
tags:
|
|
- "environment-algo"
|
|
register: google_vm
|
|
|
|
- set_fact:
|
|
cloud_instance_ip: "{{ google_vm.instance_data[0].public_ip }}"
|
|
ansible_ssh_user: ubuntu
|
|
rescue:
|
|
- debug: var=fail_hint
|
|
tags: always
|
|
- fail:
|
|
tags: always
|