fix: avoid manipulation of an existing task object by a shallow copy (#118)

Fixes: https://github.com/emsecrist/ansible-later-issue-117
This commit is contained in:
Robert Kaussow 2021-05-04 21:55:44 +02:00 committed by GitHub
parent c98a7b5c42
commit 2d37210249
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
"""Standard definition.""" """Standard definition."""
import codecs import codecs
import copy
import importlib import importlib
import inspect import inspect
import os import os
@ -118,7 +119,7 @@ class StandardBase(object, metaclass=StandardExtendedMeta):
if not candidate.faulty: if not candidate.faulty:
try: try:
normalized = normalize_task( normalized = normalize_task(
task, candidate.path, settings["ansible"]["custom_modules"] copy.copy(task), candidate.path, settings["ansible"]["custom_modules"]
) )
except LaterError as ex: except LaterError as ex:
e = ex.original e = ex.original