From c5103f9e65d92f49219e51d2c14e6ea7d3efa625 Mon Sep 17 00:00:00 2001 From: Bartek Grzybowski Date: Fri, 17 Dec 2021 11:29:42 +0100 Subject: [ANSIBLE] Drop shell completion code generation in 'cert-manager' role Moved to a dedicated role Change-Id: Ibfaf132d4d81edaee8332b809c3452d530ab1c4c Issue-ID: OOM-2902 Signed-off-by: Bartek Grzybowski --- ansible/roles/cert-manager/defaults/main.yml | 2 -- .../molecule/default/tests/test_default.py | 9 --------- ansible/roles/cert-manager/tasks/main.yml | 22 ---------------------- 3 files changed, 33 deletions(-) (limited to 'ansible') diff --git a/ansible/roles/cert-manager/defaults/main.yml b/ansible/roles/cert-manager/defaults/main.yml index 81a66f4e..aa59c240 100644 --- a/ansible/roles/cert-manager/defaults/main.yml +++ b/ansible/roles/cert-manager/defaults/main.yml @@ -7,5 +7,3 @@ cert_manager: helm_values: installCRDs: true cmctl_bin_dir: /usr/local/bin -completion_dir: /etc/bash_completion.d -completion_package: bash-completion diff --git a/ansible/roles/cert-manager/molecule/default/tests/test_default.py b/ansible/roles/cert-manager/molecule/default/tests/test_default.py index 2bac6028..4f1937a1 100644 --- a/ansible/roles/cert-manager/molecule/default/tests/test_default.py +++ b/ansible/roles/cert-manager/molecule/default/tests/test_default.py @@ -12,12 +12,3 @@ def test_cmctl(host): assert f.user == 'root' assert f.group == 'root' assert host.run('cmctl').rc == 0 - - -def test_bash_completion(host): - assert host.package("bash-completion").is_installed - - -def test_bash_completion_cmctl(host): - f = host.file('/etc/bash_completion.d/cmctl') - assert f.exists diff --git a/ansible/roles/cert-manager/tasks/main.yml b/ansible/roles/cert-manager/tasks/main.yml index 77063655..9bf7fde3 100644 --- a/ansible/roles/cert-manager/tasks/main.yml +++ b/ansible/roles/cert-manager/tasks/main.yml @@ -29,25 +29,3 @@ - 'cmctl' remote_src: true mode: 0755 - -- name: Install completion for the bash shell - package: - name: "{{ completion_package }}" - state: present - -- name: Generate shell autocompletion code for cmctl - command: cmctl completion bash - register: cmctl_completion - changed_when: false - -- name: Ensure bash completion dir exists - file: - path: "{{ completion_dir }}" - state: directory - mode: 0755 - -- name: Install bash autocompletion code for cmctl - copy: - content: "{{ cmctl_completion.stdout }}" - dest: "{{ completion_dir }}/cmctl" - mode: 0644 -- cgit 1.2.3-korg