Skip to content

Commit

Permalink
🐛(apps) skip app filtering when apps_filter is empty
Browse files Browse the repository at this point in the history
The `set_vars` playbook attempted to filter apps even when no specific apps
were provided for filtering (e.g. with an empty `apps_filter`).
Thus, we now require the `apps_filter` extra var to be defined and not empty.
  • Loading branch information
wilbrdt committed Mar 3, 2024
1 parent c5f8935 commit 7004174
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Versioning](http://semver.org/spec/v2.0.0.html).

## Unreleased

### Fixed

- App filtering when `apps_filter` variable is set but empty

## [6.19.1] - 2023-09-15

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion tasks/set_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
# We use escaped double quotes in the first regex_replace filter to be able
# to add single quotes around app name in the query
apps_filter_query: "[?{{ apps_filter.split(',') | map('regex_replace', '([\\w-]+)', \"name=='\\1'\") | join(' || ') }}]" # noqa jinja[spacing]
when: apps_filter is defined
when: apps_filter is defined and apps_filter | length > 1

- name: Filter apps
ansible.builtin.set_fact:
Expand Down

0 comments on commit 7004174

Please sign in to comment.