pre-flight.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. ...