Git Product home page Git Product logo

ansible-role-pip's Introduction

Ansible Role: Pip (for Python)

CI

An Ansible Role that installs Pip on Linux.

Requirements

On RedHat/CentOS, you may need to have EPEL installed before running this role. You can use the geerlingguy.repo-epel role if you need a simple way to ensure it's installed.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

pip_package: python3-pip

The name of the packge to install to get pip on the system. For older systems that don't have Python 3 available, you can set this to python-pip.

pip_executable: pip3

The role will try to autodetect the pip executable based on the pip_package (e.g. pip for Python 2 and pip3 for Python 3). You can also override this explicitly, e.g. pip_executable: pip3.6.

pip_install_packages: []

A list of packages to install with pip. Examples below:

pip_install_packages:
  # Specify names and versions.
  - name: docker
    version: "1.2.3"
  - name: awscli
    version: "1.11.91"

  # Or specify bare packages to get the latest release.
  - docker
  - awscli

  # Or uninstall a package.
  - name: docker
    state: absent

  # Or update a package to the latest version.
  - name: docker
    state: latest

  # Or force a reinstall.
  - name: docker
    state: forcereinstall

  # Or install a package in a particular virtualenv.
  - name: docker
    virtualenv: /my_app/venv

  # Or pass through any extra arguments.
  - name: my_special_package_from_my_special_repo
    extra_args: --extra-index-url https://my-domain/pypi/pypi-master/simple

Dependencies

None.

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, author of Ansible for DevOps.

ansible-role-pip's People

Contributors

ericsysmin avatar fgierlinger avatar geerlingguy avatar grahamlyons avatar kakawait avatar michaelpporter avatar slavoutich avatar sm-gravid-day avatar victorock avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.