Commit 7d930fe1 authored by nanahira's avatar nanahira

update python

parent 6ac6b54a
Pipeline #582 passed with stage
in 3 minutes and 45 seconds
......@@ -119,17 +119,16 @@
append: true
groups: docker
when: ansible_user_id != 'root'
- name: docker-compose
- name: docker-compose requests workaround
become: true
pip:
name: docker-compose
when: not china_mirror_pip
- name: docker-compose 国内
name: requests
extra_args: --ignore-installed
when: ansible_python.version.major == 2
- name: docker-compose
become: true
pip:
name: docker-compose
extra_args: -i https://mirrors.aliyun.com/pypi/simple/
when: china_mirror_pip
- name: docker 配置 创建目录
become: true
file:
......
......@@ -15,6 +15,26 @@
file:
path: '{{ansible_user_dir}}/.pip'
state: absent
when: not china_mirror_pip
- name: pip dir
become: true
file:
path: '{{ansible_user_dir}}/.pip'
state: directory
owner: '{{ansible_user_id}}'
group: '{{ansible_user_id}}'
when: china_mirror_pip
- name: pip conf for china mirror
become: true
copy:
content: |
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com
dest: '{{ansible_user_dir}}/.pip/pip.conf'
owner: '{{ansible_user_id}}'
group: '{{ansible_user_id}}'
- name: clean easy install
become: true
file:
......@@ -32,14 +52,6 @@
name: pip
executable: '{{pip_executable_install}}'
state: latest
when: not china_mirror_pip
- name: upgrade pip China
become: true
pip:
name: pip
executable: '{{pip_executable_install}}'
state: latest
extra_args: -i https://mirrors.aliyun.com/pypi/simple/
when: china_mirror_pip
- name: pip package list
set_fact:
......@@ -48,10 +60,3 @@
become: true
pip:
name: '{{pip_package_list}}'
when: not china_mirror_pip
- name: pip packages China
become: true
pip:
name: '{{pip_package_list}}'
extra_args: -i https://mirrors.aliyun.com/pypi/simple/
when: china_mirror_pip
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment