summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-cluster/tasks/set_etcd_launch_facts.yml
blob: eb118365a5136131734d497dd9a0af888dd19aa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
---
- set_fact: k8s_type="etcd"

- name: Generate etcd instance names(s)
  set_fact:
    scratch_name: "{{ openshift_cluster_id | default('default') }}-{{ 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') }}"