-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathgce.yml
More file actions
31 lines (30 loc) · 981 Bytes
/
Copy pathgce.yml
File metadata and controls
31 lines (30 loc) · 981 Bytes
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
---
# Set up Google Compute Engine node
# TODO: This needs to be retested
# Need commands to open firewall ports
#
# The first play needs to be run as your own userid here - since that is what
# GCE creates the new instance account.
# This will create the demo fr user account that is used to complete the rest of the install
- name: Create a sandbox instance
hosts: localhost
connection: local
vars:
names: foo,bar
machine_type: g1-small
image: centos-6-v20130926
zone: us-central1-a
tasks:
- name: Launch instances
local_action: gce instance_names={{names}} machine_type={{machine_type}}
image={{image}} zone={{zone}}
register: gce
- name: Wait for SSH to come up
local_action: wait_for host={{item.public_ip}} port=22 delay=10
timeout=60 state=started
with_items: ${ gce.instance_data }
- name: Configure instance(s)
hosts: launched
sudo: True
roles:
- create-fr-user