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

- name: Generate node instance names(s)
  set_fact:
    scratch_name: "{{ cluster_id }}-{{ k8s_type }}-{{ '%05x' | format(1048576 | random) }}"
  register: node_names_output
  with_sequence: count={{ num_nodes }}

- set_fact:
    node_names: "{{ node_names_output.results | default([])
                    | oo_collect('ansible_facts')
                    | oo_collect('scratch_name') }}"