mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 23:31:25 -07:00
parent
5babe2daea
commit
6f6bdf7914
12 changed files with 58 additions and 71 deletions
|
@ -22,8 +22,7 @@ __metaclass__ = type
|
|||
import yaml
|
||||
|
||||
from ansible.module_utils.six import PY3
|
||||
from ansible.parsing.yaml.objects import AnsibleUnicode, AnsibleSequence, AnsibleMapping
|
||||
from ansible.parsing.yaml.objects import AnsibleVaultEncryptedUnicode
|
||||
from ansible.parsing.yaml.objects import AnsibleUnicode, AnsibleSequence, AnsibleMapping, AnsibleVaultEncryptedUnicode
|
||||
from ansible.utils.unsafe_proxy import AnsibleUnsafeText
|
||||
from ansible.vars.hostvars import HostVars
|
||||
|
||||
|
@ -35,9 +34,11 @@ class AnsibleDumper(yaml.SafeDumper):
|
|||
'''
|
||||
pass
|
||||
|
||||
|
||||
def represent_hostvars(self, data):
|
||||
return self.represent_dict(dict(data))
|
||||
|
||||
|
||||
# Note: only want to represent the encrypted data
|
||||
def represent_vault_encrypted_unicode(self, data):
|
||||
return self.represent_scalar(u'!vault', data._ciphertext.decode(), style='|')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue