Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
5a4f07ad
Commit
5a4f07ad
authored
6 years ago
by
elementyang
Browse files
Options
Downloads
Patches
Plain Diff
change the way of getting etcd_member_name
parent
effd27a5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/kubespray-defaults/defaults/main.yaml
+3
-3
3 additions, 3 deletions
roles/kubespray-defaults/defaults/main.yaml
with
3 additions
and
3 deletions
roles/kubespray-defaults/defaults/main.yaml
+
3
−
3
View file @
5a4f07ad
...
...
@@ -338,13 +338,13 @@ etcd_events_access_addresses: |-
# user should set etcd_member_name in inventory/mycluster/hosts.ini
etcd_member_name
:
|-
{% for host in groups['etcd'] %}
{% if inventory_hostname == host %}{{ hostvars[host].etcd_member_name }}{% endif %}
{% if inventory_hostname == host %}{{ hostvars[host].etcd_member_name
| default("etcd" + loop.index|string)
}}{% endif %}
{% endfor %}
etcd_peer_addresses
:
|-
{% for item in groups['etcd'] -%}
{{ hostvars[item].etcd_member_name }}=https://{{ hostvars[item].access_ip | default(hostvars[item].ip | default(hostvars[item].ansible_default_ipv4['address'])) }}:2380{% if not loop.last %},{% endif %}
{{ hostvars[item].etcd_member_name
| default("etcd" + loop.index|string)
}}=https://{{ hostvars[item].access_ip | default(hostvars[item].ip | default(hostvars[item].ansible_default_ipv4['address'])) }}:2380{% if not loop.last %},{% endif %}
{%- endfor %}
etcd_events_peer_addresses
:
|-
{% for item in groups['etcd'] -%}
{{ hostvars[item].etcd_member_name }}-events=https://{{ hostvars[item].access_ip | default(hostvars[item].ip | default(hostvars[item].ansible_default_ipv4['address'])) }}:2382{% if not loop.last %},{% endif %}
{{ hostvars[item].etcd_member_name
| default("etcd" + loop.index|string)
}}-events=https://{{ hostvars[item].access_ip | default(hostvars[item].ip | default(hostvars[item].ansible_default_ipv4['address'])) }}:2382{% if not loop.last %},{% endif %}
{%- endfor %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment