community.general.easy_install (8.5.0) — module

Installs Python libraries

Authors: Matt Wright (@mattupstate)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Installs Python libraries, optionally in a C(virtualenv)


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install or update pip
  community.general.easy_install:
    name: pip
    state: latest
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install Bottle into the specified virtualenv
  community.general.easy_install:
    name: bottle
    virtualenv: /webapps/myapp/venv

Inputs

    
name:
    description:
    - A Python library name.
    required: true
    type: str

state:
    choices:
    - present
    - latest
    default: present
    description:
    - The desired state of the library. V(latest) ensures that the latest version is installed.
    type: str

executable:
    default: easy_install
    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 V(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.
    type: str

virtualenv:
    description:
    - An optional O(virtualenv) directory path to install into. If the O(virtualenv) does
      not exist, it is created automatically.
    type: str

virtualenv_command:
    default: virtualenv
    description:
    - The command to create the virtual environment with. For example V(pyvenv), V(virtualenv),
      V(virtualenv2).
    type: str

virtualenv_site_packages:
    default: false
    description:
    - 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.
    type: bool