密码中的特殊字符

编程入门 行业动态 更新时间:2024-10-23 01:42:00
本文介绍了密码中的特殊字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我从一个加密的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.

更多推荐

密码中的特殊字符

本文发布于:2023-10-29 09:59:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1539400.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:特殊字符   密码

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!