k3s-io / k3s-ansible

Apache License 2.0
1.89k stars 780 forks source link

ansible script blindly overwrites existing kube config file #259

Closed roivanov closed 7 months ago

roivanov commented 7 months ago

The following piece of code does not check if file is there already. And so may overwrite already existing config file.

    - name: Copy kubectl config to local machine
      ansible.builtin.fetch:
        src: ~{{ ansible_user }}/.kube/config
        dest: ~/.kube/config
        flat: true
roivanov commented 7 months ago

I can take this issue