From f3df0d5f4a561b6953fcc45ca173aef5f0e7a850 Mon Sep 17 00:00:00 2001 From: Mark Janssen Date: Mon, 5 Aug 2019 03:15:48 +0200 Subject: [PATCH] Always create bash_completion.d folder (#5039) --- roles/bootstrap-os/tasks/main.yml | 8 ++++++++ roles/kubernetes/master/tasks/main.yml | 12 +++--------- 2 files changed, 11 insertions(+), 9 deletions(-) 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: