You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

46 lines
970 B

---
{% from "base/map.jinja" import pip_pkgs as packages with context %}
fetch pip bootstrap:
file.managed:
- name: /opt/get-pip.py
- source: https://bootstrap.pypa.io/get-pip.py
- user: root
- makedirs: true
- skip_verify: true
remove distro pip/py3:
pkg.removed:
- name: "{{ packages.pip.py3_name }}"
- onlyif:
- which python3
bootstrap pip/py3:
cmd.run:
- name: python3 /opt/get-pip.py "pip{{ packages.pip.require }}"
- unless:
- which pip3
- onlyif:
- which python3
- require:
- file: fetch pip bootstrap
- pkg: remove distro pip/py3
- reload_modules: true
upgrade pip/py3:
cmd.run:
- name: pip3 install -U "pip{{ packages.pip.require }}"
- onlyif:
- which pip3
- reload_modules: true
python3 requests package:
pkg.installed:
- name: {{ packages.python3_requests.name }}
packages pip/py3:
pip.installed:
- pkgs:
- elasticsearch>=7.1.0, <8.0.0
- bin_env: /usr/local/bin/pip3