diff options
| author | Kenny Woodson <kwoodson@redhat.com> | 2015-11-04 11:59:28 -0500 | 
|---|---|---|
| committer | Kenny Woodson <kwoodson@redhat.com> | 2015-11-04 11:59:28 -0500 | 
| commit | 7869fb8c26a96c1e0ee74b930fd0da8a9952cb52 (patch) | |
| tree | 37b83c517769c4730b680b602672ba3f9245137a /playbooks/common/openshift-cluster/tasks | |
| parent | a706860af853be6d8bc77ea38593467e827ed527 (diff) | |
| parent | f5e83fc2330d6f784df3859f5305d4b80cc0c469 (diff) | |
| download | openshift-7869fb8c26a96c1e0ee74b930fd0da8a9952cb52.tar.gz openshift-7869fb8c26a96c1e0ee74b930fd0da8a9952cb52.tar.bz2 openshift-7869fb8c26a96c1e0ee74b930fd0da8a9952cb52.tar.xz openshift-7869fb8c26a96c1e0ee74b930fd0da8a9952cb52.zip  | |
Merge pull request #811 from openshift/master
master to prod
Diffstat (limited to 'playbooks/common/openshift-cluster/tasks')
3 files changed, 41 insertions, 0 deletions
diff --git a/playbooks/common/openshift-cluster/tasks/set_etcd_launch_facts.yml b/playbooks/common/openshift-cluster/tasks/set_etcd_launch_facts.yml new file mode 100644 index 000000000..1a6580795 --- /dev/null +++ b/playbooks/common/openshift-cluster/tasks/set_etcd_launch_facts.yml @@ -0,0 +1,13 @@ +--- +- set_fact: k8s_type="etcd" + +- name: Generate etcd instance names(s) +  set_fact: +    scratch_name: "{{ cluster_id }}-{{ k8s_type }}-{{ '%05x' | format(1048576 | random) }}" +  register: etcd_names_output +  with_sequence: count={{ num_etcd }} + +- set_fact: +    etcd_names: "{{ etcd_names_output.results | default([]) +                    | oo_collect('ansible_facts') +                    | oo_collect('scratch_name') }}" diff --git a/playbooks/common/openshift-cluster/tasks/set_master_launch_facts.yml b/playbooks/common/openshift-cluster/tasks/set_master_launch_facts.yml new file mode 100644 index 000000000..36d7b7870 --- /dev/null +++ b/playbooks/common/openshift-cluster/tasks/set_master_launch_facts.yml @@ -0,0 +1,13 @@ +--- +- set_fact: k8s_type="master" + +- name: Generate master instance names(s) +  set_fact: +    scratch_name: "{{ cluster_id }}-{{ k8s_type }}-{{ '%05x' | format(1048576 | random) }}" +  register: master_names_output +  with_sequence: count={{ num_masters }} + +- set_fact: +    master_names: "{{ master_names_output.results | default([]) +                      | oo_collect('ansible_facts') +                      | oo_collect('scratch_name') }}" diff --git a/playbooks/common/openshift-cluster/tasks/set_node_launch_facts.yml b/playbooks/common/openshift-cluster/tasks/set_node_launch_facts.yml new file mode 100644 index 000000000..278942f8b --- /dev/null +++ b/playbooks/common/openshift-cluster/tasks/set_node_launch_facts.yml @@ -0,0 +1,15 @@ +--- +- set_fact: k8s_type=node +- set_fact: sub_host_type="{{ type }}" +- set_fact: number_nodes="{{ count }}" + +- name: Generate node instance names(s) +  set_fact: +    scratch_name: "{{ cluster_id }}-{{ k8s_type }}-{{ sub_host_type }}-{{ '%05x' | format(1048576 | random) }}" +  register: node_names_output +  with_sequence: count={{ number_nodes }} + +- set_fact: +    node_names: "{{ node_names_output.results | default([]) +                    | oo_collect('ansible_facts') +                    | oo_collect('scratch_name') }}"  | 
