diff --git a/roles/k3s_server/tasks/main.yml b/roles/k3s_server/tasks/main.yml index ef4f633..2a10b1a 100644 --- a/roles/k3s_server/tasks/main.yml +++ b/roles/k3s_server/tasks/main.yml @@ -19,6 +19,12 @@ INSTALL_K3S_VERSION: "{{ k3s_version }}" changed_when: true +- name: Add K3s autocomplete to user bashrc + ansible.builtin.lineinfile: + path: "~{{ ansible_user }}/.bashrc" + regexp: '\.\s+<\(k3s completion bash\)' + line: ". <(k3s completion bash) # Added by k3s-ansible" + - name: Setup optional config file when: server_config_yaml is defined block: @@ -73,12 +79,6 @@ ansible.builtin.pause: seconds: 10 - - name: Add K3s autocomplete to user bashrc - ansible.builtin.lineinfile: - path: "~{{ ansible_user }}/.bashrc" - regexp: '\.\s+<\(k3s completion bash\)' - line: ". <(k3s completion bash) # Added by k3s-ansible" - - name: Change server to API endpoint instead of localhost ansible.builtin.command: >- /usr/local/bin/k3s kubectl config set-cluster default