Skip to content

Commit

Permalink
Fixed #260: k3s autocompletion is added to .bashrc only when necessar…
Browse files Browse the repository at this point in the history
…y; (#262)

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

Signed-off-by: Jon S. Stumpf <[email protected]>

* Remove Jinja template from name:

Co-authored-by: Derek Nola <[email protected]>
Signed-off-by: Jon S. Stumpf <[email protected]>

---------

Signed-off-by: Jon S. Stumpf <[email protected]>
Co-authored-by: Derek Nola <[email protected]>
  • Loading branch information
jon-stumpf and dereknola authored Dec 1, 2023
1 parent 19c206d commit 34bf054
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions roles/k3s_server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand Down

0 comments on commit 34bf054

Please sign in to comment.