forked from lacchain/besu-pro-testnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
site-lacchain-cloud.yml
43 lines (40 loc) · 1.18 KB
/
site-lacchain-cloud.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
- name: Compute Engine Instance
hosts: localhost
vars:
service_account_email: "[email protected]"
credentials_file: "/home/adrian/.ssh/google_compute_engine"
project_id: "everisconf"
tasks:
- name: create multiple instances
gce:
instance_names: test1
zone: us-east1-b
machine_type: n1-standard-1
image: ubuntu-1804-bionic-v20180823
state: present
service_account_email: "{{ service_account_email }}"
credentials_file: "{{ credentials_file }}"
project_id: "{{ project_id }}"
metadata: '{ "startup-script" : "apt-get update" }'
register: gce
- name: Save host data
add_host:
hostname: "{{ item.public_ip }}"
groupname: gce_instances_ips
with_items: "{{ gce.instance_data }}"
- name: Wait for SSH for instances
wait_for:
delay: 1
host: "{{ item.public_ip }}"
port: 22
state: started
timeout: 30
with_items: "{{ gce.instance_data }}"
- name: Configure Hosts
hosts: gce_instances_ips
become: yes
become_method: sudo
roles:
- lacchain-validator-node
tags:
- config