pre-flight.yml 1.3 KB

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