From 652b9cfe0ef2e5d7a950bde8580a18d80bb6f512 Mon Sep 17 00:00:00 2001 From: Ivan Halomi Date: Mon, 28 Nov 2022 11:08:25 +0100 Subject: [PATCH] Removal of dockerSDK check for other container engines Typo fix and adding condition on not checking docker SDK version when container engine is not docker This is a followup to Ic30b67daa2e215524096ad1f4385c569e3d41b95 Signed-off-by: Ivan Halomi Change-Id: Iafa24db06ad46bcfe250451ed98bc3c48d8a5138 --- ansible/roles/prechecks/tasks/package_checks.yml | 4 +++- ansible/roles/swift/tasks/reconfigure.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ansible/roles/prechecks/tasks/package_checks.yml b/ansible/roles/prechecks/tasks/package_checks.yml index c86b40aef4..272f9cbed7 100644 --- a/ansible/roles/prechecks/tasks/package_checks.yml +++ b/ansible/roles/prechecks/tasks/package_checks.yml @@ -3,7 +3,9 @@ command: "{{ ansible_facts.python.executable }} -c \"import docker; print(docker.__version__)\"" register: result changed_when: false - when: inventory_hostname in groups['baremetal'] + when: + - inventory_hostname in groups['baremetal'] + - kolla_container_engine == 'docker' failed_when: result is failed or result.stdout is version(docker_py_version_min, '<') # NOTE(osmanlicilegi): ansible_version.full includes patch number that's useless diff --git a/ansible/roles/swift/tasks/reconfigure.yml b/ansible/roles/swift/tasks/reconfigure.yml index 745626c44d..7b02b3c76c 100644 --- a/ansible/roles/swift/tasks/reconfigure.yml +++ b/ansible/roles/swift/tasks/reconfigure.yml @@ -44,7 +44,7 @@ - name: Check the configs become: true - command: "{{ kolla_container_engine }}exec -u root {{ item.name }} /usr/local/bin/kolla_set_configs --check" + command: "{{ kolla_container_engine }} exec -u root {{ item.name }} /usr/local/bin/kolla_set_configs --check" changed_when: false failed_when: false register: check_results