warn only when zones were ignored

This commit is contained in:
Michael 2023-10-26 15:42:47 +02:00 committed by GitHub
parent 542643e786
commit 50fc1d1454
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -349,6 +349,7 @@ def main():
specified_zones = module.params['zones'] specified_zones = module.params['zones']
collect_zones = list(set(specified_zones) & set(all_zones)) collect_zones = list(set(specified_zones) & set(all_zones))
ignore_zones = list(set(specified_zones) - set(collect_zones)) ignore_zones = list(set(specified_zones) - set(collect_zones))
if ignore_zones:
warn.append( warn.append(
'Please note: zone:(%s) have been ignored in the gathering process.' % ','.join(ignore_zones)) 'Please note: zone:(%s) have been ignored in the gathering process.' % ','.join(ignore_zones))
else: else: