diff --git a/managed/devops/roles/install_package/tasks/main.yml b/managed/devops/roles/install_package/tasks/main.yml index 9fa9425f50c7..e73ac9beaefa 100644 --- a/managed/devops/roles/install_package/tasks/main.yml +++ b/managed/devops/roles/install_package/tasks/main.yml @@ -112,7 +112,7 @@ # doing num_releases_to_keep + 2 because we need to protect 'TEMPORARY' directory under yb-software - name: Remove older yb software folders shell: "ls --ignore='ybc*' \"{{ yb_software_dir }}\" -t | \ - tail -n +{{ num_releases_to_keep + 2 }} | \ + tail -n +{{ num_releases_to_keep + 3 }} | \ xargs -I{} --no-run-if-empty rm -rv \"{{ yb_software_dir }}/{}\" --" register: rm_yb_softwares_result tags: