Skip to content

Commit

Permalink
Revert localhost removal from SANs
Browse files Browse the repository at this point in the history
  • Loading branch information
atsikham committed Jan 31, 2022
1 parent f899d5c commit f6bbd2a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ansible/playbooks/roles/kubernetes_master/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
certSANs: >-
{{ (groups['kubernetes_master'] | map('extract', hostvars, ['ansible_default_ipv4', 'address']) | list)
+ (groups['kubernetes_master'] | map('extract', hostvars, ['ansible_host']) | list)
+ [ '127.0.0.1' ] }}
+ [ '127.0.0.1', 'localhost' ] }}
include_role:
name: kubernetes_common
tasks_from: extend-kubeadm-config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ controlPlaneEndpoint: "localhost:3446"
apiServer:
timeoutForControlPlane: 4m0s
certSANs:
{% set address_list = ['127.0.0.1'] %}
{% set address_list = ['127.0.0.1', 'localhost'] %}
{% for host in groups['kubernetes_master'] %}
{% set _ = address_list.extend([ hostvars[host]['ansible_default_ipv4']['address'], hostvars[host]['ansible_host'] ]) %}
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
_update1: |-
apiServer:
certSANs:
{% set address_list = ['127.0.0.1'] %}
{% set address_list = ['127.0.0.1', 'localhost'] %}
{% for host in groups['kubernetes_master'] %}
{% set _ = address_list.extend([ hostvars[host]['ansible_default_ipv4']['address'], hostvars[host]['ansible_host'] ]) %}
{% endfor %}
Expand Down

0 comments on commit f6bbd2a

Please sign in to comment.