geerlingguy.pip

Ansible Role: Pip (for Python)

CI

This Ansible Role installs Pip on Linux systems.

Requirements

For RedHat/CentOS systems, you may need to install EPEL before using this role. You can use the geerlingguy.repo-epel role for an easy installation.

Role Variables

Here are the available variables with their default values (see defaults/main.yml):

  • pip_package: python3-pip

    This is the package name to install pip on your system. If your system doesn’t have Python 3, change it to python-pip.

  • pip_executable: pip3

    The role will automatically find the correct pip executable based on the pip_package. You can set this manually if desired, like pip_executable: pip3.6.

  • pip_install_packages: []

    This is a list of packages to install using pip. Examples include:

    pip_install_packages:
      # Specify names and versions.
      - name: docker
        version: "1.2.3"
      - name: awscli
        version: "1.11.91"
    
      # Or just the package names for the latest version.
      - docker
      - awscli
    
      # To uninstall a package.
      - name: docker
        state: absent
    
      # To update a package to the newest version.
      - name: docker
        state: latest
    
      # To force a reinstallation.
      - name: docker
        state: forcereinstall
    
      # To install a package in a specific virtual environment.
      - name: docker
        virtualenv: /my_app/venv
    
      # To pass in extra arguments.
      - name: my_special_package_from_my_special_repo
        extra_args: --extra-index-url https://my-domain/pypi/pypi-master/simple
    

Dependencies

There are no dependencies for this role.

Example Playbook

- hosts: all

  vars:
    pip_install_packages:
      - name: docker
      - name: awscli

  roles:
    - geerlingguy.pip

License

MIT / BSD

Author Information

This role was created in 2017 by Jeff Geerling, who is the author of Ansible for DevOps.

Informazioni sul progetto

Pip (Python package manager) for Linux.

Installa
ansible-galaxy install geerlingguy.pip
Licenza
mit
Download
11.9M
Proprietario
Father, author, developer, maker. Sometimes called "an inflammatory enigma". #stl #drupal #ansible #k8s #raspberrypi #crohns