scaleup.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. vars:
  24. openshift_bootstrap_endpoint: "https://{{ openshift_install_config['metadata']['name'] }}-api.{{ openshift_install_config['baseDomain'] }}:49500/config/worker"
  25. roles:
  26. - role: container_runtime
  27. tasks:
  28. - import_role:
  29. name: container_runtime
  30. tasks_from: docker_storage_setup_overlay.yml
  31. - import_role:
  32. name: container_runtime
  33. tasks_from: extra_storage_setup.yml
  34. - import_role:
  35. name: container_runtime
  36. tasks_from: package_crio.yml
  37. - import_role:
  38. name: openshift_node40
  39. tasks_from: install.yml
  40. - name: Wait for bootstrap endpoint to show up
  41. uri:
  42. url: "{{ openshift_bootstrap_endpoint }}"
  43. validate_certs: false
  44. delay: 10
  45. retries: 60
  46. register: result
  47. until:
  48. - "'status' in result"
  49. - result.status == 200
  50. - import_role:
  51. name: openshift_node40
  52. tasks_from: config.yml
  53. - import_role:
  54. name: openshift_node40
  55. tasks_from: systemd.yml