On 14-09-14 18:58, Michael DeHaan wrote:
Yeah you will have to do "item.something" to not get the full hash
result, like item.rc or item.stdout or item.cmd, as appropriate...

Thanks Michael. That put me on the right track. Here's what gave the expected results:

- name: builder | Add user to AllowUsers
shell: "sed -i 's|^AllowUsers |AllowUsers {{ item.item }} |' /etc/ssh/sshd_config"
  with_items: check_allowusers.results
  when: item.stdout == "0"
  notify: restart sshd

Cheers,
Patrick

--
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/54160AFA.7060603%40puzzled.xs4all.nl.
For more options, visit https://groups.google.com/d/optout.

Reply via email to