Commit f367c460 authored by nanahira's avatar nanahira

china mirror for pip

parent 2829be88
- name: China mirror
set_fact:
china_docker_mirror: true
when: china_mirror
- name: China mirror for Docker - name: China mirror for Docker
set_fact: set_fact:
mirror_docker: https://mirrors.tuna.tsinghua.edu.cn/docker-ce mirror_docker: https://mirrors.tuna.tsinghua.edu.cn/docker-ce
when: "china_mirror or china_mirror_docker" when: "china_mirror_docker"
- name: clean apt Docker - name: clean apt Docker
become: true become: true
apt: apt:
...@@ -96,14 +100,14 @@ ...@@ -96,14 +100,14 @@
name: pip name: pip
executable: '{{pip_executable}}' executable: '{{pip_executable}}'
state: latest state: latest
when: "not china_mirror" when: "not china_docker_mirror"
- name: docker-compose - name: docker-compose
become: true become: true
pip: pip:
name: docker-compose name: docker-compose
executable: '{{pip_executable}}' executable: '{{pip_executable}}'
state: latest state: latest
when: "not china_mirror" when: "not china_docker_mirror"
- name: docker-compose 国内 - name: docker-compose 国内
become: true become: true
pip: pip:
...@@ -111,7 +115,7 @@ ...@@ -111,7 +115,7 @@
executable: '{{pip_executable}}' executable: '{{pip_executable}}'
state: latest state: latest
extra_args: -i https://mirrors.aliyun.com/pypi/simple/ extra_args: -i https://mirrors.aliyun.com/pypi/simple/
when: "china_mirror" when: "china_docker_mirror"
- name: docker-compose 国内 - name: docker-compose 国内
become: true become: true
pip: pip:
...@@ -119,7 +123,7 @@ ...@@ -119,7 +123,7 @@
executable: '{{pip_executable}}' executable: '{{pip_executable}}'
state: latest state: latest
extra_args: -i https://mirrors.aliyun.com/pypi/simple/ extra_args: -i https://mirrors.aliyun.com/pypi/simple/
when: "china_mirror" when: "china_docker_mirror"
- name: docker 配置 创建目录 - name: docker 配置 创建目录
become: true become: true
file: file:
......
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