summaryrefslogtreecommitdiffstats
path: root/playbooks/gce
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/gce')
-rw-r--r--playbooks/gce/openshift-cluster/launch.yml54
-rw-r--r--playbooks/gce/openshift-cluster/tasks/launch_instances.yml7
2 files changed, 31 insertions, 30 deletions
diff --git a/playbooks/gce/openshift-cluster/launch.yml b/playbooks/gce/openshift-cluster/launch.yml
index 762fa9e8d..94e57fe4e 100644
--- a/playbooks/gce/openshift-cluster/launch.yml
+++ b/playbooks/gce/openshift-cluster/launch.yml
@@ -28,33 +28,33 @@
type: "{{ k8s_type }}"
g_sub_host_type: "{{ sub_host_type }}"
- - include: ../../common/openshift-cluster/set_infra_launch_facts_tasks.yml
- vars:
- type: "infra"
- count: "{{ num_infra }}"
- - include: tasks/launch_instances.yml
- vars:
- instances: "{{ infra_names }}"
- cluster: "{{ cluster_id }}"
- type: "{{ k8s_type }}"
- g_sub_host_type: "{{ sub_host_type }}"
-
- - set_fact:
- a_infra: "{{ infra_names[0] }}"
- - add_host: name={{ a_infra }} groups=service_master
-
+# - include: ../../common/openshift-cluster/set_infra_launch_facts_tasks.yml
+# vars:
+# type: "infra"
+# count: "{{ num_infra }}"
+# - include: tasks/launch_instances.yml
+# vars:
+# instances: "{{ infra_names }}"
+# cluster: "{{ cluster_id }}"
+# type: "{{ k8s_type }}"
+# g_sub_host_type: "{{ sub_host_type }}"
+#
+# - set_fact:
+# a_infra: "{{ infra_names[0] }}"
+# - add_host: name={{ a_infra }} groups=service_master
+#
- include: update.yml
-
-- name: Deploy OpenShift Services
- hosts: service_master
- connection: ssh
- gather_facts: yes
- roles:
- - openshift_registry
- - openshift_router
-
-- include: ../../common/openshift-cluster/create_services.yml
- vars:
- g_svc_master: "{{ service_master }}"
+#
+#- name: Deploy OpenShift Services
+# hosts: service_master
+# connection: ssh
+# gather_facts: yes
+# roles:
+# - openshift_registry
+# - openshift_router
+#
+#- include: ../../common/openshift-cluster/create_services.yml
+# vars:
+# g_svc_master: "{{ service_master }}"
- include: list.yml
diff --git a/playbooks/gce/openshift-cluster/tasks/launch_instances.yml b/playbooks/gce/openshift-cluster/tasks/launch_instances.yml
index f569b2a37..b07982305 100644
--- a/playbooks/gce/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/gce/openshift-cluster/tasks/launch_instances.yml
@@ -20,6 +20,7 @@
- host-type-{{ type }}
- sub-host-type-{{ g_sub_host_type }}
- env-host-type-{{ cluster }}-openshift-{{ type }}
+ when: instances |length > 0
register: gce
- name: Add new instances to groups and set variables needed
@@ -31,11 +32,11 @@
groups: "{{ item.tags | oo_prepend_strings_in_list('tag_') | join(',') }}"
gce_public_ip: "{{ item.public_ip }}"
gce_private_ip: "{{ item.private_ip }}"
- with_items: gce.instance_data
+ with_items: gce.instance_data | default([])
- name: Wait for ssh
wait_for: port=22 host={{ item.name }}
- with_items: gce.instance_data
+ with_items: gce.instance_data | default([])
- 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"
@@ -43,4 +44,4 @@
until: result.rc == 0
retries: 30
delay: 5
- with_items: gce.instance_data
+ with_items: gce.instance_data | default([])