title: iterate ansible task with variable
body: <p>i wish to take the output of a shell command and use that as input to run another command multiple times with each item as and arg:</p>
  
  <pre><code>---
  - hosts: myhost
    tasks:
  
      - name: determine local storage mount points
        shell: /usr/sbin/showmount -d | grep -v Directories
        register: mounts
  
      - debug: var=mounts.stdout_lines
  
      - name: run gather script
        shell: echo gather.py {{item}}
        register: gather
        with_items: "{{mounts.stdout_lines}}"
  </code></pre>
  
  <p>how do i do this?</p>