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: Jon S. Stumpf <jon.stumpf@gmail.com>

* Remove Jinja template from name:

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

---------

Signed-off-by: Jon S. Stumpf <jon.stumpf@gmail.com>
Co-authored-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
Jon S. Stumpf
2023-12-01 11:58:12 -05:00
committed by GitHub
parent 19c206d0cb
commit 34bf054f94

View File

@@ -76,12 +76,10 @@
mode: "u=rw,g=,o=" mode: "u=rw,g=,o="
- name: Add K3s autocomplete to user bashrc - name: Add K3s autocomplete to user bashrc
become: true ansible.builtin.lineinfile:
become_user: "{{ ansible_user }}" path: "~{{ ansible_user }}/.bashrc"
ansible.builtin.command: regexp: '\.\s+<\(k3s completion bash\)'
cmd: "k3s completion bash -i" line: ". <(k3s completion bash) # Added by k3s-ansible"
register: out
changed_when: out.rc != 0
- name: Change server to API endpoint instead of localhost - name: Change server to API endpoint instead of localhost
ansible.builtin.command: >- ansible.builtin.command: >-