mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Move call to filter_exit out of command execution block to prevent setting 'changed' on a command list that is completely filtered (empty).
This commit is contained in:
@@ -191,8 +191,8 @@ def main():
|
||||
else:
|
||||
commands = str(candidate).split('\n')
|
||||
|
||||
commands = filter_exit(commands)
|
||||
if commands:
|
||||
commands = filter_exit(commands)
|
||||
if not module.check_mode:
|
||||
commands = [str(c).strip() for c in commands]
|
||||
response = module.configure(commands, replace=replace)
|
||||
|
||||
Reference in New Issue
Block a user