Ensure test exclusion file is removed when there are no exclusions

If the role variable overrides are updated to remove a set of
existing tempest test exclusions, the previous exclusions file
remains on the disk even though it is not use, and not passed
to the tempest command. This is confusing and the file should
not be present unless there are active exclusions in place.

Change-Id: I5d69bf6258a00ade825cd3c746d1443dc1a35120
Jonathan Rosser 2023-08-16 12:41:33 +01:00
parent 242203bafa
commit bd5923cf5e
1 changed files with 7 additions and 0 deletions

View File

@ -185,6 +185,13 @@
- _tempest_test_excludelist | length > 0
- name: Remove tempest test exclude list when there are no exclusions
path: "{{ tempest_excludelist_file_path }}"
state: absent
- tempest_test_excludelist | length == 0
- name: Drop test_accounts_file
content: "{{ tempest_test_accounts }}"