pre-flight.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ---
  2. - name: Pre-flight checks only.
  3. hosts: workstation.lab.example.com
  4. gather_subset: min
  5. become: no
  6. collections:
  7. - p0f.operators
  8. tasks:
  9. - include_role:
  10. name: check-env
  11. apply:
  12. tags: check
  13. tags: check
  14. - include_role:
  15. name: fix-operators
  16. apply:
  17. tags: fix
  18. tags: fix
  19. - include_role:
  20. name: remove-operators
  21. apply:
  22. tags: remove
  23. loop: "{{ removed_operators }}"
  24. loop_control:
  25. loop_var: role
  26. tags: remove
  27. - include_role:
  28. name: deploy-operators
  29. apply:
  30. tags: deploy
  31. loop: "{{ added_operators }}"
  32. loop_control:
  33. loop_var: role
  34. tags: deploy
  35. - name: Install the AD482 package
  36. ansible.builtin.pip:
  37. name: rht-labs-ad482
  38. extra_args: "--extra-index-url https://pypi.apps.tools-na.prod.nextcle.com/repository/labs/simple"
  39. - name: Reinstall AD482 labs properly
  40. ansible.builtin.command:
  41. cmd: lab install ad482 --version 1.8.6
  42. creates: /home/student/.local/lib/python3.11/site-packages/ad482
  43. - name: Patch API version of some templates
  44. ansible.posix.patch:
  45. dest: /home/student/.local/lib/python3.11/site-packages/ad482/common/kubefiles/templates/{{ item }}
  46. src: files/template-patch.j2
  47. loop:
  48. - cluster.yaml
  49. - connect-cluster.yaml
  50. - elasticsearch.yaml
  51. # TODO: deploy vscode / codium ?
  52. ...