Unverified Commit 502d93bc authored by Dmitriy Safronov's avatar Dmitriy Safronov Committed by GitHub
Browse files

[289] Add K3s autocomplete to user bashrc on any server node, not only on first (#290)

parent d1d78643
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -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