summaryrefslogtreecommitdiffstats
path: root/playbooks/gce/openshift-cluster/tasks/launch_instances.yml
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/gce/openshift-cluster/tasks/launch_instances.yml')
-rw-r--r--playbooks/gce/openshift-cluster/tasks/launch_instances.yml11
1 files changed, 6 insertions, 5 deletions
diff --git a/playbooks/gce/openshift-cluster/tasks/launch_instances.yml b/playbooks/gce/openshift-cluster/tasks/launch_instances.yml
index 60cf21a5b..65dd2b71e 100644
--- a/playbooks/gce/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/gce/openshift-cluster/tasks/launch_instances.yml
@@ -9,10 +9,11 @@
project_id: "{{ lookup('env', 'gce_project_id') }}"
zone: "{{ lookup('env', 'zone') }}"
network: "{{ lookup('env', 'network') }}"
-# unsupported in 1.9.+
+ subnetwork: "{{ lookup('env', 'subnetwork') | default(omit, True) }}"
+ # unsupported in 1.9.+
#service_account_permissions: "datastore,logging-write"
tags:
- - created-by-{{ lookup('env', 'LOGNAME') |default(cluster, true) }}
+ - created-by-{{ lookup('env', 'LOGNAME') | regex_replace('[^a-z0-9]+', '') | default(cluster, true) }}
- environment-{{ cluster_env }}
- clusterid-{{ cluster_id }}
- host-type-{{ type }}
@@ -49,11 +50,11 @@
gce_public_ip: "{{ item.public_ip }}"
gce_private_ip: "{{ item.private_ip }}"
openshift_node_labels: "{{ node_label }}"
- with_items: gce.instance_data | default([], true)
+ with_items: "{{ gce.instance_data | default([], true) }}"
- name: Wait for ssh
wait_for: port=22 host={{ item.public_ip }}
- with_items: gce.instance_data | default([], true)
+ with_items: "{{ gce.instance_data | default([], true) }}"
- name: Wait for user setup
command: "ssh -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null {{ hostvars[item.name].ansible_ssh_user }}@{{ item.public_ip }} echo {{ hostvars[item.name].ansible_ssh_user }} user is setup"
@@ -61,4 +62,4 @@
until: result.rc == 0
retries: 30
delay: 5
- with_items: gce.instance_data | default([], true)
+ with_items: "{{ gce.instance_data | default([], true) }}"