Commit 7f68b7f3 authored by Julien DOCHE's avatar Julien DOCHE
Browse files

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: default avatarJulien DOCHE <julien.doche@gmail.com>
parent ca9702f6
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -58,10 +58,9 @@
    owner: "{{ ansible_user }}"

- name: Replace https://localhost:6443 by https://master-pi:6443
  replace:
    path: ~{{ ansible_user }}/.kube/config
    regexp: 'https://localhost:6443'
    replace: 'https://{{master_ip}}:6443'
  command: k3s kubectl config set-cluster default
    --server=https://{{ master_ip }}:6443
    --kubeconfig ~{{ ansible_user }}/.kube/config

- name: Create kubectl symlink
  file: