Add a YAML representer for NativeJinjaUnsafeText (#76186)

pull/75215/merge
Martin Krizek 3 years ago committed by GitHub
parent e84d660140
commit dd220ddc2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- Add a YAML representer for ``NativeJinjaUnsafeText``

@ -24,7 +24,7 @@ import yaml
from ansible.module_utils.six import text_type, binary_type
from ansible.module_utils.common.yaml import SafeDumper
from ansible.parsing.yaml.objects import AnsibleUnicode, AnsibleSequence, AnsibleMapping, AnsibleVaultEncryptedUnicode
from ansible.utils.unsafe_proxy import AnsibleUnsafeText, AnsibleUnsafeBytes
from ansible.utils.unsafe_proxy import AnsibleUnsafeText, AnsibleUnsafeBytes, NativeJinjaUnsafeText
from ansible.template import AnsibleUndefined
from ansible.vars.hostvars import HostVars, HostVarsVars
from ansible.vars.manager import VarsWithSources
@ -110,3 +110,8 @@ AnsibleDumper.add_representer(
AnsibleUndefined,
represent_undefined,
)
AnsibleDumper.add_representer(
NativeJinjaUnsafeText,
represent_unicode,
)

Loading…
Cancel
Save