pre-flight.yml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. ---
  2. - name: Pre-flight checks only.
  3. hosts: workstation.lab.example.com
  4. gather_subset: min
  5. become: no
  6. tasks:
  7. # Deploy packages.
  8. - include_role:
  9. name: install-packages
  10. apply:
  11. tags:
  12. - install
  13. tags:
  14. - install
  15. # Get auth info, check cluster comms.
  16. - include_role:
  17. name: check-env
  18. apply:
  19. tags:
  20. - check
  21. tags:
  22. - check
  23. # THIS MUST BE APPLIED BEFORE FIX OPERATORS!
  24. - include_role:
  25. name: remove-operators
  26. apply:
  27. tags:
  28. - prep
  29. - remove
  30. loop: "{{ removed_operators }}"
  31. loop_control:
  32. loop_var: role
  33. tags:
  34. - prep
  35. - remove
  36. # Fix the operator catalog sources.
  37. - include_role:
  38. name: fix-operators
  39. apply:
  40. tags:
  41. - prep
  42. - fix
  43. tags:
  44. - prep
  45. - fix
  46. # Re-apply any operators that have had their catalog sources changed.
  47. - include_role:
  48. name: deploy-operators
  49. apply:
  50. tags:
  51. - prep
  52. - deploy
  53. loop: "{{ added_operators }}"
  54. loop_control:
  55. loop_var: role
  56. tags:
  57. - prep
  58. - deploy
  59. # Ensure RBAC resources (ClusterRoles and global Groups) are there.
  60. - include_role:
  61. name: setup-rbac
  62. apply:
  63. tags:
  64. - prep
  65. - setup
  66. tags:
  67. - prep
  68. - setup
  69. # Ensure a Keycloak is there (use rhbk_state=absent var to remove).
  70. - include_role:
  71. name: deploy-rhbk
  72. apply:
  73. tags:
  74. - prep
  75. - sso
  76. tags:
  77. - prep
  78. - sso
  79. # Ensure OpenShift OAuth is using the Keycloak.
  80. - include_role:
  81. name: setup-auth
  82. apply:
  83. tags:
  84. - prep
  85. - auth
  86. tags:
  87. - prep
  88. - auth
  89. # TODO: enable user workload monitoring
  90. # TODO: deploy grafana (?)
  91. # TODO: deploy logging (?)
  92. # TODO: logging requires minio
  93. # TODO: label infra projects with ichp_infra: "true"
  94. # TODO: label nodes with k8s.ovn.org/egress-assignable=
  95. # TODO: define egress IP range somewhere (?)
  96. # TODO: create a private network (nmstate + bridges?)
  97. # Some additional configuration for infra.
  98. - name: Ensure HAProxy on utility does not forward plaintext HTTP to OpenShift.
  99. hosts: utility.lab.example.com
  100. gather_subset: min
  101. become: yes
  102. tasks:
  103. - include_role:
  104. name: setup-ingress
  105. apply:
  106. tags:
  107. - prep
  108. - ingress
  109. tags:
  110. - prep
  111. - ingress
  112. ...