Subject: [ansible-project] Re: when: search stdout_lines

  John Harmon 2018-03-01, 23:03
I can't seem to find the proper syntax to search the stdout_lines for a
string.  Consider the following.

    - name: List home dirs
      shell: "ls /home"
      register: home
      changed_when: false

    - name: List scripts directory
      shell: "ls /home/gomer/Scripts/ | wc -l"
      changed_when: false
      when: "gomer" in home.stdout_lines

I have tried all sorts of combinations to search (regexp, etc), but
whatever I try fails... can someone point me in the right direction?
To post to this group, send email to [EMAIL PROTECTED].