sops
sops copied to clipboard
SOPS remove ansible YAML declaration like "!unsafe"
SOPS is a great tool, but sometimes is a little bit invasive on YAML formatting. Ansible use YAML declaration like !unsafe to instruct parser to behave in special mode for variables evaluation/templating. SOPS remove such declaration. There are params to customize how deep SOPS can normalize/modify original YAML file ? Often happen to create variables containing such special case and secrets parts together.
Sample code:
ldap_cfg: path1: ... group_filter: !unsafe (&(objectClass=group)(member:1.2.840.113556.1.4.1941:={{.UserDN}})) ...
!unsafe will be removed.
SOPS converts files into its internal representation and then re-creates them from that internal representation. The internal representation does not support YAML tags, so they do not survive round-trips.
YAML tags are not a language standard ?
They are a YAML language standard. But sops does not support them, because it's internal data structures do not support them.
I've got it. Thanks
(It's definitely possible to add support for this. But it does require some work, as the internal data structures have to be adjusted for this.)
can i please add a thumbs up for this feature? happy to help with it - it would be awesome to have tags available