summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-cluster
diff options
context:
space:
mode:
authorChengcheng Mu <chengcheng.mu@amadeus.com>2015-10-06 16:59:00 +0200
committerChengcheng Mu <chengcheng.mu@amadeus.com>2015-10-06 16:59:00 +0200
commita3ba0278879075e14373a6872acc5f0c3cc3d9a2 (patch)
tree3c0a829dabf217cbabb77075153664e869d4bcda /playbooks/common/openshift-cluster
parent071eee9acb80621919dda2a07f9fe9c56dcfda27 (diff)
downloadopenshift-a3ba0278879075e14373a6872acc5f0c3cc3d9a2.tar.gz
openshift-a3ba0278879075e14373a6872acc5f0c3cc3d9a2.tar.bz2
openshift-a3ba0278879075e14373a6872acc5f0c3cc3d9a2.tar.xz
openshift-a3ba0278879075e14373a6872acc5f0c3cc3d9a2.zip
Revert "Revert "GCE support""
This reverts commit 3073d1f729f9dcd202088f6b318b465567c6344b.
Diffstat (limited to 'playbooks/common/openshift-cluster')
-rw-r--r--playbooks/common/openshift-cluster/set_infra_launch_facts_tasks.yml15
1 files changed, 15 insertions, 0 deletions
diff --git a/playbooks/common/openshift-cluster/set_infra_launch_facts_tasks.yml b/playbooks/common/openshift-cluster/set_infra_launch_facts_tasks.yml
new file mode 100644
index 000000000..0fd53eb7d
--- /dev/null
+++ b/playbooks/common/openshift-cluster/set_infra_launch_facts_tasks.yml
@@ -0,0 +1,15 @@
+---
+- set_fact: k8s_type=infra
+- set_fact: sub_host_type="{{ type }}"
+- set_fact: number_infra="{{ count }}"
+
+- name: Generate infra instance names(s)
+ set_fact:
+ scratch_name: "{{ cluster_id }}-{{ k8s_type }}-{{ sub_host_type }}-{{ '%05x' | format(1048576 | random) }}"
+ register: infra_names_output
+ with_sequence: count={{ number_infra }}
+
+- set_fact:
+ infra_names: "{{ infra_names_output.results | default([])
+ | oo_collect('ansible_facts')
+ | oo_collect('scratch_name') }}"