Hi all,
I’m trying to solve following problem.
I need to create virtualenv for python using centos scl rh-python36
Manual way is easy, there are several way how to do that
/opt/rh/rh-python36/root/bin/python -m venv env
. ./env/bin/activate
pip install -U pip setuptools
pip install -t requirements.txt
But but with ansible I’m a little bit lost.
- name: create virtualenv
pip:
virtualenv: "{{ haproxy_tools_remote_dir }}/{{ haproxy_tools_version }}/env"
virtualenv_python: "/opt/rh/{{ haproxy_tools_scl_python }}/root/bin/python"
requirements: "{{ haproxy_tools_remote_dir }}/{{ haproxy_tools_version }}/requirements.txt"
tags:
- debug
The output is
fatal: [lb01.test.host.sk]: FAILED! => {"changed": false, "msg": "No setuptools found in remote host, please install it first.”}
Any idea, please ?
regards
Peter