softplayer-ansible/playbooks/other/k3s-save-config/playbook.yml

16 lines
368 B
YAML

- hosts: k3s_cluster
name: Copy kubeconfig to localhost
remote_user: admin
become: true
vars:
output_path: /tmp/outputs
tasks:
- name: Storing config on the local machine
when: download_config
ansible.builtin.fetch:
src: "/home/admin/.kube/config"
dest: "{{ output_path }}/config"
flat: true
tags: add_user