mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-05 16:04:09 -07:00
added docs for vault and made trigger shorter: !vault (#20985)
* added docs for vault and made trigger shorter: !vault * added single var valuting * Update playbooks_vault.rst Edit pass for spelling and grammar. Ship it! * Update playbooks_vault.rst Typo fixes.
This commit is contained in:
parent
9703b0ff39
commit
a2c38c47aa
7 changed files with 31 additions and 8 deletions
|
@ -156,6 +156,4 @@ AnsibleConstructor.add_constructor(
|
|||
u'!unsafe',
|
||||
AnsibleConstructor.construct_yaml_unsafe)
|
||||
|
||||
AnsibleConstructor.add_constructor(
|
||||
u'!vault-encrypted',
|
||||
AnsibleConstructor.construct_vault_encrypted_unicode)
|
||||
AnsibleConstructor.add_constructor(u'!vault', AnsibleConstructor.construct_vault_encrypted_unicode)
|
||||
|
|
|
@ -40,7 +40,7 @@ def represent_hostvars(self, data):
|
|||
|
||||
# Note: only want to represent the encrypted data
|
||||
def represent_vault_encrypted_unicode(self, data):
|
||||
return self.represent_scalar(u'!vault-encrypted', data._ciphertext.decode(), style='|')
|
||||
return self.represent_scalar(u'!vault', data._ciphertext.decode(), style='|')
|
||||
|
||||
if PY3:
|
||||
represent_unicode = yaml.representer.SafeRepresenter.represent_str
|
||||
|
|
|
@ -73,7 +73,7 @@ class AnsibleSequence(AnsibleBaseYAMLObject, list):
|
|||
class AnsibleVaultEncryptedUnicode(yaml.YAMLObject, AnsibleUnicode):
|
||||
__UNSAFE__ = True
|
||||
__ENCRYPTED__ = True
|
||||
yaml_tag = u'!vault-encrypted'
|
||||
yaml_tag = u'!vault'
|
||||
|
||||
@classmethod
|
||||
def from_plaintext(cls, seq, vault):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue