Add kubectl & helm bash autocomplete

Sem-Ver: feature
Depends-On: Id868ea6c1d14de8425944244d1243384acd143be
Change-Id: I5cd0c827f889cfc56a9f85a58e9853435cb9b596
diff --git a/releasenotes/notes/add_kubectl_bash_autocomplete-7b02df64b69198c8.yaml b/releasenotes/notes/add_kubectl_bash_autocomplete-7b02df64b69198c8.yaml
new file mode 100644
index 0000000..7ec7eca
--- /dev/null
+++ b/releasenotes/notes/add_kubectl_bash_autocomplete-7b02df64b69198c8.yaml
@@ -0,0 +1,4 @@
+---
+features:
+  - |
+    Load the kubectl & helm auto complete in the .bashrc file
diff --git a/roles/helm/tasks/debian.yml b/roles/helm/tasks/debian.yml
index f6004b0..c636b37 100644
--- a/roles/helm/tasks/debian.yml
+++ b/roles/helm/tasks/debian.yml
@@ -32,3 +32,9 @@
   ansible.builtin.apt:
     name: ["helm"]
     install_recommends: false
+
+- name: add bash autocomplete for helm
+  ansible.builtin.lineinfile:
+    path: /root/.bashrc
+    line: 'source <(helm completion bash)'
+    insertbefore: EOF
diff --git a/roles/kubernetes/tasks/control-plane.yml b/roles/kubernetes/tasks/control-plane.yml
index 347340d..bb2a4a4 100644
--- a/roles/kubernetes/tasks/control-plane.yml
+++ b/roles/kubernetes/tasks/control-plane.yml
@@ -85,6 +85,12 @@
     mode: 0600
     remote_src: true
 
+- name: add bash autocomplete for kubectl
+  ansible.builtin.lineinfile:
+    path: /root/.bashrc
+    line: 'source <(kubectl completion bash)'
+    insertbefore: EOF
+
 - name: install pip
   ansible.builtin.apt:
     name: python3-pip