pre-flight.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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, get auth info, etc.
  8. - include_role:
  9. name: check-env
  10. apply:
  11. tags:
  12. - check
  13. tags:
  14. - check
  15. # THIS MUST BE BEFORE FIX OPERATORS!
  16. - include_role:
  17. name: remove-operators
  18. apply:
  19. tags:
  20. - prep
  21. - remove
  22. loop: "{{ removed_operators }}"
  23. loop_control:
  24. loop_var: role
  25. tags:
  26. - prep
  27. - remove
  28. # Fix the operator catalog sources.
  29. - include_role:
  30. name: fix-operators
  31. apply:
  32. tags:
  33. - prep
  34. - fix
  35. tags:
  36. - prep
  37. - fix
  38. # Re-apply any operators that have had their catalog sources changed.
  39. - include_role:
  40. name: deploy-operators
  41. apply:
  42. tags:
  43. - prep
  44. - deploy
  45. loop: "{{ added_operators }}"
  46. loop_control:
  47. loop_var: role
  48. tags:
  49. - prep
  50. - deploy
  51. # Ensure RBAC resources (ClusterRoles and Groups) are there.
  52. - include_role:
  53. name: setup-rbac
  54. apply:
  55. tags:
  56. - prep
  57. - setup
  58. tags:
  59. - prep
  60. - setup
  61. # Ensure a Keycloak is there.
  62. - include_role:
  63. name: deploy-rhbk
  64. apply:
  65. tags:
  66. - prep
  67. - sso
  68. tags:
  69. - prep
  70. - sso
  71. # Ensure OpenShift OAuth is using the Keycloak.
  72. - include_role:
  73. name: setup-auth
  74. apply:
  75. tags:
  76. - prep
  77. - auth
  78. tags:
  79. - prep
  80. - auth
  81. # Some additional configuration for infra.
  82. - name: Ensure HAProxy on utility does not forward plaintext HTTP to OpenShift.
  83. hosts: utility.lab.example.com
  84. gather_subset: min
  85. become: yes
  86. tasks:
  87. - include_role:
  88. name: setup-ingress
  89. apply:
  90. tags:
  91. - prep
  92. - ingress
  93. tags:
  94. - prep
  95. - ingress
  96. ...