title: Piping a python output into an Ansible variable
body: <p>I have a python script that outputs a hash.  I would like that hash to be piped into my variable inside of the ansible script.</p>
  
  <p>The Python command looks like this-</p>
  
  <pre><code>#!/bin/python
  import crypt
  test= crypt.crypt('test', '$6$Som3S@lt$')
  print test
  </code></pre>
  
  <p>My ansible playbook looks like this - </p>
  
  <pre><code> hosts: webservers
    remote_user: test
    become: yes
    become_method: sudo
  
    vars:
        pass:
  
  
    tasks:
  
    - name: Run Python Password script
      command: /home/test/userPW.py &gt; pass
  </code></pre>
  
  <p>Thanks</p>