ansible-vault encrypt_string '--IcannotCh@ngeThisPassword'
This command gives the following error. So it tries to read it as a normal arg.
ansible-vault: error: unrecognized arguments: --IcannotCh@ngeThisPassword
What is the correct way to escape this? I tried:
But slashes \
/
these get prefixed to the password like:
\--IcannotCh@ngeThisPassword
What is the proper way to encrypt this?
This is not an issue with ansible-vault, this is general 'shell argument passing', the way to escape it is --
ansible-vault encrypt_string -- '--IcannotCh@ngeThisPassword'