blob: ee5e1d8b8fd46f19a13a43bba4aefe63126ed8fa [file] [log] [blame]
---
- name: Download pip package manager with proxy
become: yes
tags: ['pip-manager']
get_url:
url: https://bootstrap.pypa.io/get-pip.py
dest: /tmp/get-pip.py
when: pip_conf_dir is not defined
environment:
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
no_proxy: "{{ no_proxy }}"
- name: Install pip package manager with proxy
become: yes
tags: ['pip-manager']
shell: python /tmp/get-pip.py
when: pip_conf_dir is not defined
environment:
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
no_proxy: "{{ no_proxy }}"
- name: Update pip
tags: ['pip']
become: yes
pip:
name: pip
state: latest
environment:
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
no_proxy: "{{ no_proxy }}"
- name: Update python packages with no proxy
tags: ['pip']
become: yes
pip:
name: '{{ item }}'
state: present
with_items: "{{ pip_packages }}"
environment:
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
no_proxy: "{{ no_proxy }}"