ansible-vault-mode
ansible-vault-mode copied to clipboard
After ansible-vault-mode is disabled it cannot be reenabled for the same file: Symbol’s value as variable is void
When ansible-vault-mode
is enabled and then disabled for a file, it's no longer possible to enable it for this file because of the error
Symbol’s value as variable is void: ansible-vault--password-file
The reason is the makunbound
that is meant to act on the buffer local variables in ansible-vault--clear-local-variables
. But it if the variable is not local, it unsets the the variable part of the global symbol. So the next access to the symbol finds it void as a variable.
Use kill-local-variable
or test, if the variable is local. I don't understand, where the local variables are removed before calling ansible-vault--clear-local-variables
or otherwise why makunbound
acts on the global symbols variable part.