diff --git a/lib/ansible/runner/filter_plugins/core.py b/lib/ansible/runner/filter_plugins/core.py index 63eec29678..51a1f827e5 100644 --- a/lib/ansible/runner/filter_plugins/core.py +++ b/lib/ansible/runner/filter_plugins/core.py @@ -25,7 +25,7 @@ class FilterModule(object): return { 'to_json': json.dumps, 'from_json': json.loads, - 'to_yaml': yaml.dump, + 'to_yaml': yaml.safe_dump, 'from_yaml': yaml.load, }