Merge pull request #110 from asymmetric/patch-1

Add alternative example for string finding
pull/63/head
Brian Coca 9 years ago
commit 28818e052c
  1. 5
      language_features/register_logic.yml

@ -30,6 +30,11 @@
- shell: echo "motd contains the word hi"
when: motd_result.stdout.find('hi') != -1
# or also:
- shell: echo "motd contains word hi"
when: "'hi' in motd_result.stdout"
# you can use 'stdout_lines' to loop over the registered output lines
- name: motd lines matching 'hi'
shell: echo "{{ item }}"