Brian, I'm not following you at all. It was the shell command that uses the 
delegate_to. The debug is only showing the register from the shell.

    - name: Test delegate to
      shell: echo "{{ groups.consul_server[0] }}" && hostname -i
      register: __hostname
      delegate_to: "{{ groups.consul_server[0] }}"

    - debug: var=__hostname


"stdout_lines": [
    "10.0.196.116",  <--- echo "{{ groups.consul_server[0] }}"
    "127.0.1.1"      <--- hostname -i  
], 

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/dd207cfa-9bbf-4569-8bde-81bc16511940%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to