On 31. aug. 2016 11:43, fanvalt wrote:
Hello,

I don't understand where I am doing wrong in this simple tasks:

- name: Search for bin directory
  stat:
    path: /{{ Directoryname }}/{{ item }}/bin
  register: previous
  with_items: "{{ shr4you_inst.stdout_lines }}"
  when: shr4you_inst|success

- debug: msg="previous {{previous}}"

It very hard to read the output using debug this way, please use this instead
- debug: var=previous

If you do you probably will see what's happening a lot easier.

When you use register with with_items the result back is a list.

https://docs.ansible.com/ansible/playbooks_loops.html#using-register-with-a-loop

--
Kai Stian Olstad

--
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/e163e692-faf6-eadd-79be-423c3aedb197%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to