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
6da0ecfa
Commit
6da0ecfa
authored
8 years ago
by
Matthew Mosesohn
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #550 from chadswen/hostname-alias
Hostname alias fixes
parents
1ccc10ba
45c2900e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
roles/kubernetes/node/templates/kubelet.j2
+1
-1
1 addition, 1 deletion
roles/kubernetes/node/templates/kubelet.j2
roles/kubernetes/preinstall/tasks/etchosts.yml
+1
-1
1 addition, 1 deletion
roles/kubernetes/preinstall/tasks/etchosts.yml
with
2 additions
and
2 deletions
roles/kubernetes/node/templates/kubelet.j2
+
1
−
1
View file @
6da0ecfa
...
...
@@ -14,7 +14,7 @@ KUBELET_ADDRESS="--address={{ ip | default("0.0.0.0") }}"
# The port for the info server to serve on
# KUBELET_PORT="--port=10250"
# You may leave this blank to use the actual hostname
KUBELET_HOSTNAME="--hostname-override={{
inventory
_hostname }}"
KUBELET_HOSTNAME="--hostname-override={{
ansible
_hostname }}"
{% if inventory_hostname in groups['kube-master'] and inventory_hostname not in groups['kube-node'] %}
KUBELET_REGISTER_NODE="--register-node=false"
{% endif %}
...
...
This diff is collapsed.
Click to expand it.
roles/kubernetes/preinstall/tasks/etchosts.yml
+
1
−
1
View file @
6da0ecfa
...
...
@@ -4,7 +4,7 @@
dest
:
/etc/hosts
block
:
|-
{% for item in groups['all'] -%}
{{ hostvars[item]['access_ip'] | default(hostvars[item]['ip'] | default(hostvars[item].ansible_default_ipv4.address)) }} {{ item }}
{{ hostvars[item]['access_ip'] | default(hostvars[item]['ip'] | default(hostvars[item].ansible_default_ipv4.address)) }}
{% if (item != hostvars[item]['ansible_hostname']) %} {{ hostvars[item]['ansible_hostname'] }}{% endif %}
{{ item }}
{% endfor %}
state
:
present
create
:
yes
...
...
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