mirror of
https://github.com/ansible/awx.git
synced 2026-08-03 03:19:57 -02:30
Bugfix: adjust incorrectly passed keywords with exclude-strings argument (#15721)
* Fix incorrectly passed keywords with exclude-strings arg to ansible-runner worker cleanup command Signed-off-by: Sasa Jovicic <jovicic.sasa@hotmail.com> * Keep the quotes for each arg and adjust test_receptor --------- Signed-off-by: Sasa Jovicic <jovicic.sasa@hotmail.com>
This commit is contained in:
@@ -360,7 +360,7 @@ def _convert_args_to_cli(vargs):
|
||||
args = ['cleanup']
|
||||
for option in ('exclude_strings', 'remove_images'):
|
||||
if vargs.get(option):
|
||||
args.append('--{}="{}"'.format(option.replace('_', '-'), ' '.join(vargs.get(option))))
|
||||
args.append('--{} {}'.format(option.replace('_', '-'), ' '.join(f'"{item}"' for item in vargs.get(option))))
|
||||
for option in ('file_pattern', 'image_prune', 'process_isolation_executable', 'grace_period'):
|
||||
if vargs.get(option) is True:
|
||||
args.append('--{}'.format(option.replace('_', '-')))
|
||||
|
||||
Reference in New Issue
Block a user