mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-25 00:12:37 +01:00
contrib/ansible: Use kubectl to set the server url in conf
Sometimes https://127.0.0.1:6443 can be written in the conf, the regexp does not account for that. Signed-off-by: Julien DOCHE <julien.doche@gmail.com>
This commit is contained in:
@@ -58,10 +58,9 @@
|
|||||||
owner: "{{ ansible_user }}"
|
owner: "{{ ansible_user }}"
|
||||||
|
|
||||||
- name: Replace https://localhost:6443 by https://master-pi:6443
|
- name: Replace https://localhost:6443 by https://master-pi:6443
|
||||||
replace:
|
command: k3s kubectl config set-cluster default
|
||||||
path: ~{{ ansible_user }}/.kube/config
|
--server=https://{{ master_ip }}:6443
|
||||||
regexp: 'https://localhost:6443'
|
--kubeconfig ~{{ ansible_user }}/.kube/config
|
||||||
replace: 'https://{{master_ip}}:6443'
|
|
||||||
|
|
||||||
- name: Create kubectl symlink
|
- name: Create kubectl symlink
|
||||||
file:
|
file:
|
||||||
|
|||||||
Reference in New Issue
Block a user