(ansible 2.1) I have a set_fact like:
- name: Get plant agent data from consul set_fact: myfact: "{{ lookup('consul_kv', 'mykey recurse=true') }}" When the lookup returns an array of size >= 2, 'myfact' is assigned the array value. But when the lookup returns an array of size == 1, 'myfact' is assigned the *single object* at index 0 of the array. The result is arrays of size one are flattened into an dict. Is this by design? Some kind of attempted helpfulness? Its causing all kinds of grief because subsequent uses of this fact can't depend on it being an array of dict or just a simple dict. -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/63bae6ee-68e8-48b9-b8fc-71e5a701eca4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.