set_node_launch_facts.yml 552 B

123456789101112131415
  1. ---
  2. - set_fact: k8s_type=node
  3. - set_fact: sub_host_type="{{ type }}"
  4. - set_fact: number_nodes="{{ count }}"
  5. - name: Generate node instance names(s)
  6. set_fact:
  7. scratch_name: "{{ openshift_cluster_id | default('default') }}-{{ k8s_type }}-{{ sub_host_type }}-{{ '%05x' | format(1048576 | random) }}"
  8. register: node_names_output
  9. with_sequence: count={{ number_nodes }}
  10. - set_fact:
  11. node_names: "{{ node_names_output.results | default([])
  12. | oo_collect('ansible_facts')
  13. | oo_collect('scratch_name') }}"