本文介绍了密码中的特殊字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我从一个加密的ansible-vault文件中读取了我的root密码.但是,当我在ansible_become_pass上使用它时,操作失败,因为密码包含特殊字符.在我的示例中,"#"
I read my root passwords from an encrypted ansible-vault file. But when I use it on ansible_become_pass the operation fails because the password contains a special character. In my example "#"
这是我的yml:
- hosts: sirius remote_user: ansusr become: yes vars_files: - vault_vars.yml become_pass: "{{ root_pass_sirius }}"ansible-playbook check.yml --ask-vault-pass
致命:失败!=>{"msg":"{{TesT#1234}}:模板字符串时模板错误:意外的char'#'为6.字符串:{{TesT#1234}}"}
如何掩盖#字符?
推荐答案在实际运行该加密命令之前,请使用 set + H .
Use set +H before actually running that encryption command.
更多推荐
密码中的特殊字符
发布评论