New module argument to specify the executable used for running 'easy_install'. This allows support for system installation of packages on systems with multiple installations of Python.

pull/3930/merge
Pedro Romano 11 years ago committed by Michael DeHaan
parent 48e50a9c11
commit 3c33273071

@ -57,6 +57,16 @@ options:
C(pyvenv), C(virtualenv), C(virtualenv2).
required: false
default: virtualenv
executable:
description:
- The explicit executable or a pathname to the executable to be used to
run easy_install for a specific version of Python installed in the
system. For example C(easy_install-3.3), if there are both Python 2.7
and 3.3 installations in the system and you want to run easy_install
for the Python 3.3 installation.
version_added: "1.3"
required: false
default: null
notes:
- Please note that the M(easy_install) module can only install Python
libraries. Thus this module is not able to remove libraries. It is
@ -88,12 +98,14 @@ def main():
virtualenv=dict(default=None, required=False),
virtualenv_site_packages=dict(default='no', type='bool'),
virtualenv_command=dict(default='virtualenv', required=False),
executable=dict(default='easy_install', required=False),
)
module = AnsibleModule(argument_spec=arg_spec, supports_check_mode=True)
name = module.params['name']
env = module.params['virtualenv']
easy_install = module.get_bin_path(module.params['executable'], True, ['%s/bin' % env])
site_packages = module.params['virtualenv_site_packages']
virtualenv_command = module.params['virtualenv_command']

Loading…
Cancel
Save