Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Commit

Permalink
rename variable name 3.0 (#1286)
Browse files Browse the repository at this point in the history
  • Loading branch information
liubo0127 authored Apr 23, 2020
1 parent 68b0f37 commit fbc0c2d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions roles/local/tasks/binary_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
with_items: "{{ third_party_packages }}"
when:
- has_outbound_network
- not under_gfw
- not under_outbound

- name: download other binary under gfw
- name: download other binary under outbound
get_url:
url: "{{ item.url }}"
dest: "{{ downloads_dir }}/{{ item.name }}-{{ item.version }}.tar.gz"
Expand All @@ -27,10 +27,10 @@
until: "'OK' in get_url_result.msg or 'file already exists' in get_url_result.msg"
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
with_items: "{{ third_party_packages_under_gfw }}"
with_items: "{{ third_party_packages_under_outbound }}"
when:
- has_outbound_network
- under_gfw
- under_outbound

- name: download TiSpark packages
get_url:
Expand Down
4 changes: 2 additions & 2 deletions roles/local/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
warn=no
curl -s --connect-timeout 10 google.com 2>/dev/null >/dev/null; echo $?
changed_when: false
register: gfw_st
register: outbound_st

- name: set outbound network fact[2]
set_fact: under_gfw={{ gfw_st.stdout.strip() != '0' }}
set_fact: under_outbound={{ outbound_st.stdout.strip() != '0' }}

# do actual downloading
- name: download tidb binary
Expand Down
2 changes: 1 addition & 1 deletion roles/local/templates/binary_packages.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ third_party_packages:
url: "https://dl.grafana.com/oss/release/grafana-6.1.6.linux-amd64.tar.gz"


third_party_packages_under_gfw:
third_party_packages_under_outbound:
- name: prometheus
version: 2.8.1
url: "https://download.pingcap.org/prometheus-2.8.1.linux-amd64.tar.gz"
Expand Down
2 changes: 1 addition & 1 deletion roles/pre-ansible/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ pypy_version: 5.6.0
pypy_download_url_base: "https://bitbucket.org/pypy/pypy/downloads"
pypy_download_url: "{{ pypy_download_url_base }}/pypy2-v{{ pypy_version }}-linux64.tar.bz2"

pypy_download_url_under_gfw: "http://download.pingcap.org/pypy2-v5.6.0-linux64.tar.bz2"
pypy_download_url_under_outbound: "http://download.pingcap.org/pypy2-v5.6.0-linux64.tar.bz2"
6 changes: 3 additions & 3 deletions roles/pre-ansible/tasks/coreos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
- name: CoreOS - detect outbound network[2]
shell: curl -s --connect-timeout 2 google.com 2>/dev/null >/dev/null; echo $?
changed_when: false
register: gfw_st
register: outbound_st

- name: CoreOS - set outbound network fact[2]
set_fact: under_gfw={{ gfw_st.stdout.strip() != '0' }}
set_fact: under_outbound={{ outbound_st.stdout.strip() != '0' }}

- name: CoreOS - use mirror if detect outbound network
set_fact:
pypy_download_url: "{{ pypy_download_url_under_gfw }}"
pypy_download_url: "{{ pypy_download_url_under_outbound }}"

- name: CoreOS | Create bootstrap directory
shell: sudo mkdir -p {{ bootstrap_script_dir }}
Expand Down

0 comments on commit fbc0c2d

Please sign in to comment.