I am learning ansible.
I want to install virtual environment and install cassandra-driver inside venv. Could some one suggest me how to do that?
here is the code I have tried.
- hosts: localhost
gather_facts: no
connection: local
name: install cassendra-driver
become: true
become_user: root
tasks:
- name: Install the latest version of pip
apt:
name: python-pip
state: latest
force_apt_get: yes
- name: Install virtualenv
pip:
name:
- virtualenv
- name: Install "cassandra-driver"
pip:
name:
- cassandra-driver==3.19.0
Please help me..