main.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ---
  2. #
  3. # TODO: fix .m2/settings.xml
  4. #
  5. - name: Ensure Java is versioned correctly for AD482
  6. become: yes
  7. ansible.builtin.command:
  8. cmd: /usr/sbin/alternatives --set {{ item }} java-11-openjdk.x86_64
  9. loop:
  10. - java
  11. - javac
  12. - name: Load the python alternative
  13. ansible.builtin.slurp:
  14. src: /var/lib/alternatives/python
  15. register: altpy
  16. - name: Install an alternative for python3.9 if not found
  17. become: yes
  18. ansible.builtin.command:
  19. cmd: /usr/sbin/alternatives --install /usr/bin/python python /usr/bin/python3.9 15
  20. when:
  21. - not "/usr/bin/python3.9" in (altpy['content'] | b64decode)
  22. - name: Activate the Python alternative for AD482
  23. become: yes
  24. ansible.builtin.command:
  25. cmd: /usr/sbin/alternatives --set python /usr/bin/python3.9
  26. - name: Ensure credentials for internal registry are active
  27. containers.podman.podman_login:
  28. registry: registry.ocp4.example.com:8443
  29. username: developer
  30. password: developer
  31. - name: Mirror the quay.io images to internal registry, fixing format along the way
  32. ansible.builtin.command:
  33. cmd: /usr/bin/skopeo copy --format=v2s2 docker://quay.io/redhattraining/{{ image }} registry.ocp4.example.com:8443/redhattraining/{{ image }}
  34. loop:
  35. - ad482-ch05s04-connect-cluster:latest
  36. - ad482-ch05s06-connect-cluster:latest
  37. - ad482-ch05s08-connect-cluster:latest
  38. - ad482-postgresql:latest
  39. # patch scripts ad482/connect_connectors.py ad482/connect_debezium.py ad482/connect_transformation.py
  40. ...