pre-flight.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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: Remove the lab wrapper
  36. become: yes
  37. ansible.builtin.file:
  38. path: /usr/local/bin/lab
  39. state: absent
  40. - name: Install the AD482 package
  41. ansible.builtin.command:
  42. command: pip3.11 install rht-labs-ad482 --extra-index-url https://pypi.apps.tools-na.prod.nextcle.com/repository/labs/simple
  43. - name: Reinstall AD482 labs properly
  44. ansible.builtin.command:
  45. cmd: lab install ad482 --version 1.8.6 -u
  46. - name: Patch API version of some templates
  47. ansible.posix.patch:
  48. dest: /home/student/.local/lib/python3.11/site-packages/ad482/common/kubefiles/templates/{{ item }}
  49. src: files/template-patch.j2
  50. loop:
  51. - cluster.yaml
  52. - connect-cluster.yaml
  53. - elasticsearch.yaml
  54. # TODO: deploy vscode / codium ?
  55. ...