title: run local python script inside virtual environment using yaml file
body: <p>I want to run my local python script inside virtual environment. Here is the code I have tried.
  I have created virtual environment and installed Cassandra-driver as well</p>
  
  <pre><code>---
  - hosts: localhost
    gather_facts: no
    connection: local
    name: install cassendra-driver
    become: true
    become_user: root
    vars:
      PROJECT_HOME: "/home/hari/Desktop/venvs"
    tasks:
            - name: Run a script using an executable in virtual environment
                      script: "/space/code_base/add_new_column_to_table.py"
                      virtualenv: "{{ PROJECT_HOME }}/myenv"
                      args:
                          executable: python2
  </code></pre>
  
  <p>But I am getting error</p>
  
  <ul>
  <li>ERROR! Syntax Error while loading YAML.
  mapping values are not allowed in this context</li>
  </ul>
  
  <p>The error appears to be in '/home/hari/Desktop/cassendra-driver_2.yml': line 30, column 27, but may
  be elsewhere in the file depending on the exact syntax problem.</p>
  
  <p>The offending line appears to be:</p>
  
  <pre><code>      - name: Run a script using an executable in virtual environment
                  script: "/space/code_base/add_new_column_to_table.py"
                        ^ here
  </code></pre>
  
  <p>*</p>
  
  <p>Could some one help me?</p>
  
  <p>My requirement is to run local python script inside virtual environment.</p>