scaleup.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. ---
  2. - name: Ensure there are new_nodes
  3. hosts: localhost
  4. connection: local
  5. gather_facts: no
  6. tasks:
  7. - fail:
  8. msg: >
  9. Detected no new_workers in inventory. Please add hosts to the
  10. new_workers host group to add nodes.
  11. when:
  12. - groups.new_workers | default([]) | length == 0
  13. - name: run the init
  14. import_playbook: ../init/main.yml
  15. vars:
  16. l_init_fact_hosts: "new_workers"
  17. l_openshift_version_set_hosts: "new_workers"
  18. l_install_base_packages: True
  19. l_repo_hosts: "new_workers"
  20. l_base_packages_hosts: "new_workers"
  21. - name: install nodes
  22. hosts: new_workers
  23. roles:
  24. - role: container_runtime
  25. tasks:
  26. - import_role:
  27. name: container_runtime
  28. tasks_from: docker_storage_setup_overlay.yml
  29. - import_role:
  30. name: container_runtime
  31. tasks_from: extra_storage_setup.yml
  32. - import_role:
  33. name: container_runtime
  34. tasks_from: package_crio.yml
  35. - import_role:
  36. name: openshift_node40
  37. tasks_from: install.yml
  38. - name: Wait for bootstrap endpoint to show up
  39. uri:
  40. url: "{{ openshift_bootstrap_endpoint }}"
  41. validate_certs: false
  42. delay: 10
  43. retries: 60
  44. register: result
  45. until:
  46. - "'status' in result"
  47. - result.status == 200
  48. - import_role:
  49. name: openshift_node40
  50. tasks_from: config.yml