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

Signed-off-by: Dmitriy Safronov <zimniy@cyberbrain.pw>
This commit is contained in:
Dmitriy Safronov 2024-01-16 22:33:02 +04:00 committed by GitHub
parent d1d7864337
commit 502d93bc02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 6 deletions

View File

@ -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