restarting coredns pod
cobbler_kickstart_file: rocky8.ks
management_network_namespace: network-config
management_network_pod: mngmnt-network-container
+ infiniband_pod: infiniband-container
file_perm: '0775'
mount_dir: /mnt/temp/
tasks:
retries: "{{ max_retries }}"
until: "'master' in k8s_nodes.stdout"
+ - name: Restart coredns pod
+ command: kubectl rollout restart deployment.apps/coredns -n kube-system
+ changed_when: true
+
- block:
- name: Check mngmnt_network pod status
command: kubectl get pods -n {{ management_network_namespace }}
when: management_network_pod in mngmnt_network_pod_status.stdout
when: device_config_support
+ - block:
+ - name: Check mngmnt_network pod status
+ command: kubectl get pods -n {{ management_network_namespace }}
+ changed_when: false
+ register: mngmnt_network_pod_status
+ failed_when: false
+
+ - name: Wait for infiniband pod to come to ready state
+ command: kubectl wait --for=condition=ready -n {{ management_network_namespace }} pod -l app=infiniband
+ changed_when: false
+ when: infiniband_pod in mngmnt_network_pod_status.stdout
+
+ - name: Get infiniband pod name
+ command: 'kubectl get pod -n {{ management_network_namespace }} -l app=infiniband -o jsonpath="{.items[0].metadata.name}"'
+ changed_when: false
+ register: infiniband_pod_name
+ when: infiniband_pod in mngmnt_network_pod_status.stdout
+
+ - name: Configuring infiniband container
+ command: 'kubectl exec --stdin --tty -n {{ management_network_namespace }} {{ infiniband_pod_name.stdout }} \
+ -- ansible-playbook /root/omnia/control_plane/roles/control_plane_ib/files/infiniband_container_configure.yml'
+ changed_when: false
+ when: infiniband_pod in mngmnt_network_pod_status.stdout
+ when: ib_switch_support
+
- name: Check cobbler pod status
command: kubectl get pods -n {{ cobbler_namespace }}
changed_when: false
