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

Commit

Permalink
Merge pull request #638 from superlzs0476/release-2.1
Browse files Browse the repository at this point in the history
Importer one of  PD addresse
  • Loading branch information
superlzs0476 authored Dec 13, 2018
2 parents 74134fc + 98c34d7 commit a762cda
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions roles/tidb_lightning/templates/tidb-lightning.toml.j2
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# lightning Configuration

{% set all_pd = [] -%}
{% set pd_hosts = groups.pd_servers %}
{% for host in pd_hosts -%}
{% set pd_ip = hostvars[host].ansible_host | default(hostvars[host].inventory_hostname) -%}
{% set pd_port = hostvars[host].pd_client_port -%}
{% set _ = all_pd.append("%s:%s" % (pd_ip, pd_port)) -%}
{% endfor -%}
{% set pd_host = groups.pd_servers[0] -%}
{% set pd_ip = hostvars[pd_host].ansible_host | default(hostvars[pd_host].inventory_hostname) -%}
{% set pd_port = hostvars[pd_host].pd_client_port -%}
{% set _ = all_pd.append("%s:%s" % (pd_ip, pd_port)) -%}

[lightning]
{% for item, value in tidb_lightning_conf.lightning | dictsort -%}
Expand Down

0 comments on commit a762cda

Please sign in to comment.