Note
This plugin is part of the community.general collection (version 3.8.1).
You might already have this collection installed if you are using the ansible
package. It is not included in ansible-core
. To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.easy_install
.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
executable string | Default: "easy_install" | 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 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. |
name string / required | A Python library name | |
state string |
| The desired state of the library. latest ensures that the latest version is installed. |
virtualenv string | an optional virtualenv directory path to install into. If the virtualenv does not exist, it is created automatically | |
virtualenv_command string | Default: "virtualenv" | The command to create the virtual environment with. For example pyvenv , virtualenv , virtualenv2 . |
virtualenv_site_packages boolean |
| Whether the virtual environment will inherit packages from the global site-packages directory. Note that if this setting is changed on an already existing virtual environment it will not have any effect, the environment must be deleted and newly created. |
Note
easy_install
module can only install Python libraries. Thus this module is not able to remove libraries. It is generally recommended to use the ansible.builtin.pip module which you can first install using community.general.easy_install.virtualenv
parameter is specified.- name: Install or update pip community.general.easy_install: name: pip state: latest - name: Install Bottle into the specified virtualenv community.general.easy_install: name: bottle virtualenv: /webapps/myapp/venv
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/easy_install_module.html