pre-flight.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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.pip:
  42. name: rht-labs-ad482
  43. extra_args: "--extra-index-url https://pypi.apps.tools-na.prod.nextcle.com/repository/labs/simple"
  44. - name: Reinstall AD482 labs properly
  45. ansible.builtin.command:
  46. cmd: lab install ad482 --version 1.8.6
  47. creates: /home/student/.local/lib/python3.11/site-packages/ad482
  48. - name: Patch API version of some templates
  49. ansible.posix.patch:
  50. dest: /home/student/.local/lib/python3.11/site-packages/ad482/common/kubefiles/templates/{{ item }}
  51. src: files/template-patch.j2
  52. loop:
  53. - cluster.yaml
  54. - connect-cluster.yaml
  55. - elasticsearch.yaml
  56. # TODO: deploy vscode / codium ?
  57. ...