Unverified Commit 34bf054f authored by Jon S. Stumpf's avatar Jon S. Stumpf Committed by GitHub
Browse files

Fixed #260: k3s autocompletion is added to .bashrc only when necessary; (#262)



* Fixed #260: k3s autocompletion is added to .bashrc only when necessary;

Signed-off-by: default avatarJon S. Stumpf <jon.stumpf@gmail.com>

* Remove Jinja template from name:

Co-authored-by: default avatarDerek Nola <derek.nola@suse.com>
Signed-off-by: default avatarJon S. Stumpf <jon.stumpf@gmail.com>

---------

Signed-off-by: default avatarJon S. Stumpf <jon.stumpf@gmail.com>
Co-authored-by: default avatarDerek Nola <derek.nola@suse.com>
parent 19c206d0
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -76,12 +76,10 @@
        mode: "u=rw,g=,o="

    - name: Add K3s autocomplete to user bashrc
      become: true
      become_user: "{{ ansible_user }}"
      ansible.builtin.command:
        cmd: "k3s completion bash -i"
      register: out
      changed_when: out.rc != 0
      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: >-