mirror of
https://github.com/trailofbits/algo.git
synced 2025-06-05 06:33:56 +02:00
Instance size (#404)
* Escaping Special Characters #388 * Make instance sizes more flexible to edit #355
This commit is contained in:
parent
bf75a1bb03
commit
16329fe088
6 changed files with 16 additions and 12 deletions
16
config.cfg
16
config.cfg
|
@ -58,9 +58,13 @@ SSH_keys:
|
||||||
private: configs/algo.pem
|
private: configs/algo.pem
|
||||||
public: configs/algo.pem.pub
|
public: configs/algo.pem.pub
|
||||||
|
|
||||||
dynamic_inventory_groups:
|
cloud_providers:
|
||||||
- azure
|
azure:
|
||||||
- digitalocean
|
size: Basic_A0
|
||||||
- ec2
|
digitalocean:
|
||||||
- gce
|
size: 512mb
|
||||||
- local
|
ec2:
|
||||||
|
size: t2.micro
|
||||||
|
gce:
|
||||||
|
size: f1-micro
|
||||||
|
local:
|
||||||
|
|
|
@ -19,6 +19,6 @@
|
||||||
create: yes
|
create: yes
|
||||||
block: |
|
block: |
|
||||||
[algo:children]
|
[algo:children]
|
||||||
{% for group in dynamic_inventory_groups %}
|
{% for group in cloud_providers.keys() %}
|
||||||
{{ group }}
|
{{ group }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
virtual_network: algo_net
|
virtual_network: algo_net
|
||||||
name: "{{ azure_server_name }}"
|
name: "{{ azure_server_name }}"
|
||||||
ssh_password_enabled: false
|
ssh_password_enabled: false
|
||||||
vm_size: Basic_A0
|
vm_size: "{{ cloud_providers.azure.size }}"
|
||||||
tags:
|
tags:
|
||||||
Environment: Algo
|
Environment: Algo
|
||||||
ssh_public_keys:
|
ssh_public_keys:
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
sku: '16.04-LTS'
|
sku: '16.04-LTS'
|
||||||
version: latest
|
version: latest
|
||||||
register: azure_rm_virtualmachine
|
register: azure_rm_virtualmachine
|
||||||
|
|
||||||
# To-do: Add error handling - if vm_size requested is not available, can we fall back to another, ideally with a prompt?
|
# To-do: Add error handling - if vm_size requested is not available, can we fall back to another, ideally with a prompt?
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
command: droplet
|
command: droplet
|
||||||
name: "{{ do_server_name }}"
|
name: "{{ do_server_name }}"
|
||||||
region_id: "{{ do_region }}"
|
region_id: "{{ do_region }}"
|
||||||
size_id: "512mb"
|
size_id: "{{ cloud_providers.digitalocean.size }}"
|
||||||
image_id: "ubuntu-16-04-x64"
|
image_id: "ubuntu-16-04-x64"
|
||||||
ssh_key_ids: "{{ do_ssh_key.ssh_key.id }}"
|
ssh_key_ids: "{{ do_ssh_key.ssh_key.id }}"
|
||||||
unique_name: yes
|
unique_name: yes
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
keypair: "VPNKEY"
|
keypair: "VPNKEY"
|
||||||
vpc_subnet_id: "{{ vpc.subnets[0].id }}"
|
vpc_subnet_id: "{{ vpc.subnets[0].id }}"
|
||||||
group: vpn-secgroup
|
group: vpn-secgroup
|
||||||
instance_type: t2.micro
|
instance_type: "{{ cloud_providers.ec2.size }}"
|
||||||
image: "{{ ami_image }}"
|
image: "{{ ami_image }}"
|
||||||
wait: true
|
wait: true
|
||||||
region: "{{ region }}"
|
region: "{{ region }}"
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
gce:
|
gce:
|
||||||
instance_names: "{{ server_name }}"
|
instance_names: "{{ server_name }}"
|
||||||
zone: "{{ zone }}"
|
zone: "{{ zone }}"
|
||||||
machine_type: f1-micro
|
machine_type: "{{ cloud_providers.gce.size }}"
|
||||||
image: ubuntu-1604
|
image: ubuntu-1604
|
||||||
service_account_email: "{{ service_account_email }}"
|
service_account_email: "{{ service_account_email }}"
|
||||||
credentials_file: "{{ credentials_file_path }}"
|
credentials_file: "{{ credentials_file_path }}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue