ansible / ansible-rulebook

Apache License 2.0
193 stars 77 forks source link

feat: support string interpolation of encrypted variables #672

Closed mkanoor closed 5 months ago

mkanoor commented 6 months ago

https://issues.redhat.com/browse/AAP-22487

We can now support

"{{ some_encrypted_variable }}"

and also

"Some {{ some_encrypted_variable }}"
bzwei commented 5 months ago

Since we do decryption earlier than the substitution, we may not need to check wether the string is encrypt again in https://github.com/mkanoor/ansible-rulebook/blob/213545c6ee53bd3b452cde8ad162d4d629c23f4c/ansible_rulebook/util.py#L69

mkanoor commented 5 months ago

Since we do decryption earlier than the substitution, we may not need to check wether the string is encrypt again in https://github.com/mkanoor/ansible-rulebook/blob/213545c6ee53bd3b452cde8ad162d4d629c23f4c/ansible_rulebook/util.py#L69

@bzwei These relates to variables that don't go thru Jinja substitution because the vaulted strings are directly embedded in the rulebook like here