guhcampos
8/25/2015 - 7:37 PM

tasks.yml

    #
    # This tries to stat "stdout_line_0\nstdout_line_1\nstdout_line_2\n" instead of
    # stat stdout_line_0 ; stat stdout_line_1 ; stat_stdout_line_2
    #
    # (also tried with `command` instead of `shell`
    #
    - name: list something
      shell: "ls _somedir_/{{ item }}/"
      register: somevar
      with_items:
        - dir1
        - dir2
        - dir3
    
    - name: stat something
      stat: >
        path="{{ item.1 }}"
      with_subelements:
        - somevar.results
        - stdout_lines