diff --git a/docs/kubernetes.core.kubectl_connection.rst b/docs/kubernetes.core.kubectl_connection.rst index b415a6a53d..97e60f9cd8 100644 --- a/docs/kubernetes.core.kubectl_connection.rst +++ b/docs/kubernetes.core.kubectl_connection.rst @@ -426,7 +426,7 @@ Examples - name: Get My App pod name ansible.builtin.set_fact: - my_app_pod_name: "{{ my_app_pod.resources[0].metadata.name') }}" + my_app_pod_name: "{{ my_app_pod.resources[0].metadata.name }}" - name: Add My App pod to inventory ansible.builtin.add_host: diff --git a/plugins/connection/kubectl.py b/plugins/connection/kubectl.py index 89695bce33..47953845b1 100644 --- a/plugins/connection/kubectl.py +++ b/plugins/connection/kubectl.py @@ -239,7 +239,7 @@ - name: Get My App pod name ansible.builtin.set_fact: - my_app_pod_name: "{{ my_app_pod.resources[0].metadata.name') }}" + my_app_pod_name: "{{ my_app_pod.resources[0].metadata.name }}" - name: Add My App pod to inventory ansible.builtin.add_host: