diff --git a/roles/bootstrap-os/tasks/main.yml b/roles/bootstrap-os/tasks/main.yml index 292017446..cb575f372 100644 --- a/roles/bootstrap-os/tasks/main.yml +++ b/roles/bootstrap-os/tasks/main.yml @@ -72,3 +72,11 @@ - ceph-common state: present when: rbd_provisioner_enabled|default(false) + +- name: Ensure bash_completion.d folder exists + file: + name: /etc/bash_completion.d/ + state: directory + owner: root + group: root + mode: 0755 diff --git a/roles/kubernetes/master/tasks/main.yml b/roles/kubernetes/master/tasks/main.yml index 6cb14f534..6d881caf9 100644 --- a/roles/kubernetes/master/tasks/main.yml +++ b/roles/kubernetes/master/tasks/main.yml @@ -42,21 +42,14 @@ - kubectl - upgrade -- name: Make sure bash_completion.d folder exists - file: - name: "/etc/bash_completion.d/" - state: directory - when: ansible_os_family in ["ClearLinux"] - tags: - - kubectl - - name: Install kubectl bash completion shell: "{{ bin_dir }}/kubectl completion bash >/etc/bash_completion.d/kubectl.sh" when: ansible_os_family in ["Debian","RedHat"] tags: - kubectl + ignore_errors: True -- name: Set kubectl bash completion file +- name: Set kubectl bash completion file permissions file: path: /etc/bash_completion.d/kubectl.sh owner: root @@ -66,6 +59,7 @@ tags: - kubectl - upgrade + ignore_errors: True - name: Disable SecurityContextDeny admission-controller and enable PodSecurityPolicy set_fact: