bootstrap.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. ---
  2. - name: Node Preparation Checkpoint Start
  3. hosts: all
  4. gather_facts: false
  5. tasks:
  6. - name: Set Node preparation 'In Progress'
  7. run_once: true
  8. set_stats:
  9. data:
  10. installer_phase_node:
  11. status: "In Progress"
  12. start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
  13. - name: Only target nodes that have not yet been bootstrapped
  14. hosts: localhost
  15. tasks:
  16. - add_host:
  17. name: "{{ item }}"
  18. groups: oo_exclude_bootstrapped_nodes
  19. ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
  20. ansible_become: "{{ g_sudo | default(omit) }}"
  21. with_items: "{{ groups.oo_nodes_to_bootstrap | default([]) }}"
  22. changed_when: no
  23. when: hostvars[item].openshift_is_bootstrapped | default(False) | bool
  24. - import_playbook: disable_excluders.yml
  25. vars:
  26. l_node_group: oo_nodes_to_bootstrap:!oo_exclude_bootstrapped_nodes
  27. - import_playbook: configure_nodes.yml
  28. vars:
  29. l_node_group: oo_nodes_to_bootstrap:!oo_exclude_bootstrapped_nodes
  30. - import_playbook: configure_bootstrap.yml
  31. - import_playbook: enable_excluders.yml
  32. vars:
  33. l_node_group: oo_nodes_to_bootstrap:!oo_exclude_bootstrapped_nodes
  34. - import_playbook: clean_image.yml
  35. vars:
  36. l_node_group: oo_nodes_to_bootstrap:!oo_exclude_bootstrapped_nodes
  37. - name: Node Preparation Checkpoint End
  38. hosts: all
  39. gather_facts: false
  40. tasks:
  41. - name: Set Node preparation 'Complete'
  42. run_once: true
  43. set_stats:
  44. data:
  45. installer_phase_node:
  46. status: "Complete"
  47. end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"