mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2026-10-23 03:22:03 +02:00
Better cleanup with reset playbook (#353)
* Better cleanup with reset playbook The install playbook adds some convenience commands into the user's .bashrc. If K3s is uninstalled, these commands produce errors. Since they are eaily identifiable, it is trivial to remove them to improve the user's experience. Signed-off-by: Marko Vukovic <8951449+anon-software@users.noreply.github.com>
This commit is contained in:
1 parent
61ba8b57a3
commit
3e0c982a95
1 file changed
+9
@@ -31,3 +31,12 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /etc/rancher/k3s/config.yaml
|
path: /etc/rancher/k3s/config.yaml
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
|
- name: Undo user setup
|
||||||
|
hosts: server
|
||||||
|
tasks:
|
||||||
|
- name: Remove K3s commands from ~/.bashrc
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: "~{{ ansible_user }}/.bashrc"
|
||||||
|
search_string: "Added by k3s-ansible"
|
||||||
|
state: absent
|
||||||
Reference in new issue
Block a user