1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #2976 from stoned/pip-virtualenv_command-pathname

Allow virtualenv_command argument of the pip module to be a pathname
This commit is contained in:
Michael DeHaan 2013-05-24 20:01:12 -07:00
commit 82909179a0

View file

@ -65,8 +65,9 @@ options:
virtualenv_command:
version_aded: "1.1"
description:
- The command to create the virtual environment with. For example
C(pyvenv), C(virtualenv), C(virtualenv2).
- The command or a pathname to the command to create the virtual
environment with. For example C(pyvenv), C(virtualenv),
C(virtualenv2), C(~/bin/virtualenv), C(/usr/local/bin/virtualenv).
required: false
default: virtualenv
use_mirrors:
@ -193,7 +194,9 @@ def main():
if env:
env = os.path.expanduser(env)
virtualenv = module.get_bin_path(virtualenv_command, True)
virtualenv = os.path.expanduser(virtualenv_command)
if os.path.basename(virtualenv) == virtualenv:
virtualenv = module.get_bin_path(virtualenv_command, True)
if not os.path.exists(os.path.join(env, 'bin', 'activate')):
if module.check_mode:
module.exit_json(changed=True)