【发布时间】:2019-09-13 12:51:00
【问题描述】:
我想使用 WinRM 通过 ansible 与我的 Windows 主机进行通信。 我已经配置了 WinRM 并在 ansible hosts 文件中以纯文本形式指定了凭据。平正在工作。 现在我想将密码指定为加密 - 但是这里最好的方法是什么?
我尝试使用 Vault 功能:
ansible-vault encrypt_string password123 --ask-vault-pass
并尝试在 hosts 文件中指定输出但没有成功。
[winclients]
testserver
[winclients:vars]
ansible_connection=winrm
ansible_winrm_transport=credssp
ansible_port=5986
ansible_winrm_scheme=https
ansible_winrm_message_encryption=always
ansible_winrm_server_cert_validation=validate
ansible_user=testuser
ansible_password=!vault |
$ANSIBLE_VAULT;1.1;AES256
38373237366432653838643061373035333931616466613564653836393862343939313431393064....
3234
但现在我收到错误消息:
testserver | UNREACHABLE! => {
"changed": false,
"msg": "credssp: Received error status from the server: (3221225581) STATUS_LOGON_FAILURE 0xc000006d",
"unreachable": true
}
【问题讨论】:
标签: windows authentication encryption ansible winrm