--- - ansible.builtin.add_host: name: "zuul-scheduler" ansible_connection: kubectl ansible_kubectl_container: zuul-scheduler ansible_kubectl_pod: "zuul-scheduler-0" ansible_kubectl_kubeconfig: "{{ ansible_env.HOME }}/.kube/config" - name: Fetch nodepool-launcher Pod info command: "kubectl get pod -o=custom-columns=NAME:.metadata.name --no-headers --selector=run=nodepool-launcher" register: nodepool_launcher_info environment: KUBECONFIG: "{{ ansible_env.HOME }}/.kube/config" - ansible.builtin.add_host: name: "nodepool-launcher" ansible_connection: kubectl ansible_kubectl_pod: "{{ nodepool_launcher_info.stdout }}" ansible_kubectl_container: launcher ansible_kubectl_kubeconfig: "{{ ansible_env.HOME }}/.kube/config" - ansible.builtin.add_host: name: "nodepool-builder" ansible_connection: kubectl ansible_kubectl_container: nodepool-builder ansible_kubectl_pod: "nodepool-builder-0" ansible_kubectl_kubeconfig: "{{ ansible_env.HOME }}/.kube/config"