Ver código fonte

introduce the course switching roles

Grega Bremec 3 semanas atrás
pai
commit
08fa57b78b

+ 10 - 0
playbooks/pre-flight.yml

@@ -22,6 +22,7 @@
       loop_control:
         loop_var: role
       tags: prep
+    # FIXME if an installplan has multiple owners?
     - include_role:
         name: deploy-operators
         apply:
@@ -40,4 +41,13 @@
         apply:
           tags: workstation
       tags: workstation
+    - include_role:
+        name: setup-for-ad482
+        apply:
+          tags:
+            - workstation
+            - ad482
+      tags:
+        - workstation
+        - ad482
 ...

+ 1 - 0
playbooks/roles/deploy-operators/tasks/main.yml

@@ -132,6 +132,7 @@
 
 - name: Handle installPlan if the subscription changed anything
   block:
+    # TODO: sometimes an installPlan will list multiple subscriptions as owners?!?
     - name: Wait for installPlan to show up
       kubernetes.core.k8s_info:
         kubeconfig: "{{ kubeadmin_config }}"

+ 0 - 6
playbooks/roles/install-labs/tasks/main.yml

@@ -13,12 +13,6 @@
 # TODO: ansible.posix.patch not found if you just run from playbook (syntax
 #       error?!?). Re-running goes well and finds the module.
 #
-# TODO: fix .m2/settings.xml
-#
-# TODO: set java to 11 (for the AD482 part)
-#
-# TODO: set java back to 21 (for the custom part)
-#
 - name: Upgrade pip
   ansible.builtin.pip:
     name: pip

+ 31 - 0
playbooks/roles/setup-for-ad482/tasks/main.yml

@@ -0,0 +1,31 @@
+---
+#
+# TODO: fix .m2/settings.xml
+#
+# TODO: /usr/bin/python is 3.11 (alternatives); override the link or use python3 for exercises
+#
+# TODO: copy connect images from quay.io to registry.ocp4.example.com:8443 with --format=v2s2 and then patch
+#       ad482/connect_connectors.py ad482/connect_debezium.py ad482/connect_transformation.py
+#       to use the new images
+#
+- name: Ensure Java is versioned correctly for AD482
+  become: yes
+  ansible.builtin.command:
+    command: /usr/sbin/alternatives --set {{ item }} java-11-openjdk.x86_64
+  loop:
+    - java
+    - javac
+
+- name: Load the python alternative
+  ansible.builtin.slurp:
+    src: /var/lib/alternatives/python
+  register: altpy
+
+- name: Install an alternative for python3.9 if not found
+  become: yes
+  ansible.builtin.command:
+    command: /usr/sbin/alternatives --install /usr/bin/python python /usr/bin/python3.9 15
+  when:
+    - "/usr/bin/python3.9" not in (altpy['content'] | b64decode)
+
+...

+ 5 - 0
playbooks/roles/setup-for-sakbf/tasks/main.yml

@@ -0,0 +1,5 @@
+---
+#
+# TODO: set java/javac back to 21 (for the custom part)
+#
+...