嗨,我是Ansible的新手,我正在禁用寡妇资产上的用户帐户(win_user),并希望保留禁用帐户的列表。我从寄存器变量得到以下输出。请让我知道如何在以下输出中获取全名的值
"msg": {
"changed": false,
"msg": "All items completed",
"results": [
{
"_ansible_ignore_errors": null,
"_ansible_item_label": "10.157.165.148,Administrator,11/29/2017,no",
"_ansible_item_result": true,
"_ansible_no_log": false,
"changed": false,
"item": "10.157.165.148,Administrator,11/29/2017,no",
"skip_reason": "Conditional result was False",
"skipped": true
},
{
"_ansible_ignore_errors": null,
"_ansible_item_label": "10.157.165.148,tempAnsible,5/17/2018,no",
"_ansible_item_result": true,
"_ansible_no_log": false,
"changed": false,
"item": "10.157.165.148,tempAnsible,5/17/2018,no",
"skip_reason": "Conditional result was False",
"skipped": true
},
{
"_ansible_ignore_errors": null,
"_ansible_item_label": "10.157.165.148,test,,yes",
"_ansible_item_result": true,
"_ansible_no_log": false,
"_ansible_parsed": true,
"account_disabled": true,
"account_locked": false,
"changed": false,
"description": "",
"failed": false,
"**fullname**": "test",
"groups": [
{
"name": "Users",
"path": "WinNT://WORKGROUP/OWAISWIN7US7/Users"
}
],
"item": "10.157.165.148,test,,yes",
"name": "test",
"password_expired": false,
"password_never_expires": false,
"path": "WinNT://WORKGROUP/OWAISWIN7US7/test",
"sid": "S-1-5-21-528634768-985535934-2148684352-1023",
"state": "present",
"user_cannot_change_password": false
},
{
"_ansible_ignore_errors": null,
"_ansible_item_label": "10.157.165.148,temp,,yes",
"_ansible_item_result": true,
"_ansible_no_log": false,
"_ansible_parsed": true,
"account_disabled": true,
"account_locked": false,
"changed": false,
"description": "",
"failed": false,
"**fullname**": "temp",
"groups": [
{
"name": "Users",
"path": "WinNT://WORKGROUP/OWAISWIN7US7/Users"
}
],
"item": "10.157.165.148,temp,,yes",
"name": "temp",
"password_expired": false,
"password_never_expires": false,
"path": "WinNT://WORKGROUP/OWAISWIN7US7/temp",
"sid": "S-1-5-21-528634768-985535934-2148684352-1021",
"state": "present",
"user_cannot_change_password": false
}
]
}
}
我尝试使用output_users.results.fullname,但没有成功
谢谢。