How to use results of find and win_find

Hello,
How to use results of find and win_find, i am registering the output of this to some variable, but should i trigger a task based on this var | changed? or some other condition?

this is seriously annoying, i keep getting different errors every time

{“failed”: true, “msg”: “‘list object’ has no attribute ‘files’”}

How do we pick the right attribute from win_find

It would be best to show the tasks you have that are failing, otherwise we are just guessing

Also using the debug module on your registered variable can help you determine the structure.

below is the var output from debug and i want to pick the bold ones
ok: [1.2.3.4] => {
“changed”: false,
“exepath”: {
“changed”: false,
“msg”: “All items completed”,
“results”: [
{
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: false,
“examined”: 248,
“files”: [
{
“attributes”: “Normal”,
“checksum”: “d55589f2c116bc66a050e7e91a7cf8f0d82e2ffb”,
“creationtime”: 1493042546,
“extension”: “.exe”,
“filename”: “file1.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042546,
“lastwritetime”: 1493042546,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file1\file1.exe”,
“size”: 22528
},
{
“attributes”: “Normal”,
“checksum”: “7f33b6cc2188a84f50eae660f6feaafcbb49c5c7”,
“creationtime”: 1493042578,
“extension”: “.exe”,
“filename”: “file2.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042578,
“lastwritetime”: 1493042578,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file2\file2.exe”,
“size”: 23552
},
{
“attributes”: “Normal”,
“checksum”: “cb8fe7af45fc52072c5faf38d742f37da1f30ee8”,
“creationtime”: 1493044416,
“extension”: “.exe”,
“filename”: “file3.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493044416,
“lastwritetime”: 1493044416,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file3\file3.exe”,
“size”: 13312
},
{
“attributes”: “Normal”,
“checksum”: “cafd70213b261a0fcbca9f3149b4a6c075757057”,
“creationtime”: 1493042570,
“extension”: “.exe”,
“filename”: “file4.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042570,
“lastwritetime”: 1493042570,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\p1\file4.exe”,
“size”: 96768
},
{
“attributes”: “Normal”,
“checksum”: “8311bdf39f3d2a95b324db7561ca5f308c89a5b0”,
“creationtime”: 1493042548,
“extension”: “.exe”,
“filename”: “file5.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042548,
“lastwritetime”: 1493042548,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file5\file5.exe”,
“size”: 15360
},
{
“attributes”: “Normal”,
“checksum”: “5ce533fa868945131afcea8885b8e94c94650106”,
“creationtime”: 1493044420,
“extension”: “.exe”,
“filename”: “file6.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493044420,
“lastwritetime”: 1493044420,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file6\file6.exe”,
“size”: 24064
}
],
“item”: {
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: true,
“checksum”: “8ec14062b741f989b7a228eaaee40ce8e3819100”,
“dest”: “D:\\org\file5.zip”,
“item”: {
“_ansible_delegated_vars”: {
“ansible_host”: “localhost”
},
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: true,
“checksum_dest”: null,
“checksum_src”: “8ec14062b741f989b7a228eaaee40ce8e3819100”,
“dest”: “/home/ec2-user/orgservers/downloads/file5.zip”,
“gid”: 500,
“group”: “ec2-user”,
“invocation”: {
“module_args”: {
“attributes”: null,
“backup”: false,
“checksum”: “”,
“content”: null,
“delimiter”: null,
“dest”: “/home/ec2-user/orgservers/downloads/file5.zip”,
“directory_mode”: null,
“follow”: false,
“force”: false,
“force_basic_auth”: false,
“group”: null,
“headers”: null,
“http_agent”: “ansible-httpget”,
“mode”: null,
“owner”: null,
“path”: “/home/ec2-user/orgservers/downloads/file5.zip”,
“regexp”: null,
“remote_src”: null,
“selevel”: null,
“serole”: null,
“setype”: null,
“seuser”: null,
“sha256sum”: “”,
“src”: null,
“timeout”: 10,
“tmp_dest”: “”,
“unsafe_writes”: null,
“url”: “http://url.com/private/v3/latest/file5.zip”,
“url_password”: “VALUE_SPECIFIED_IN_NO_LOG_PARAMETER”,
“url_username”: “org”,
“use_proxy”: true,
“validate_certs”: true
}
},
“item”: “file5.zip”,
“md5sum”: “98757a9bd5a25b6defb0ee9f88883e54”,
“mode”: “0664”,
“msg”: “OK (6807558 bytes)”,
“owner”: “ec2-user”,
“size”: 6807558,
“src”: “/tmp/tmpRMhf6K”,
“state”: “file”,
“status_code”: 200,
“uid”: 500,
“url”: “http://url.com/private/v3/latest/file5.zip
},
“operation”: “file_copy”,
“original_basename”: “source”,
“size”: 6807558,
“src”: “C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1493747337.84-131806438102881\source”
},
“matched”: 6
},
{
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: false,
“examined”: 248,
“files”: [
{
“attributes”: “Normal”,
“checksum”: “d55589f2c116bc66a050e7e91a7cf8f0d82e2ffb”,
“creationtime”: 1493042546,
“extension”: “.exe”,
“filename”: “file1.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042546,
“lastwritetime”: 1493042546,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file1\file1.exe”,
“size”: 22528
},
{
“attributes”: “Normal”,
“checksum”: “7f33b6cc2188a84f50eae660f6feaafcbb49c5c7”,
“creationtime”: 1493042578,
“extension”: “.exe”,
“filename”: “file2.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042578,
“lastwritetime”: 1493042578,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file2\file2.exe”,
“size”: 23552
},
{
“attributes”: “Normal”,
“checksum”: “cb8fe7af45fc52072c5faf38d742f37da1f30ee8”,
“creationtime”: 1493044416,
“extension”: “.exe”,
“filename”: “file3.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493044416,
“lastwritetime”: 1493044416,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file3\file3.exe”,
“size”: 13312
},
{
“attributes”: “Normal”,
“checksum”: “cafd70213b261a0fcbca9f3149b4a6c075757057”,
“creationtime”: 1493042570,
“extension”: “.exe”,
“filename”: “file4.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042570,
“lastwritetime”: 1493042570,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\p1\file4.exe”,
“size”: 96768
},
{
“attributes”: “Normal”,
“checksum”: “8311bdf39f3d2a95b324db7561ca5f308c89a5b0”,
“creationtime”: 1493042548,
“extension”: “.exe”,
“filename”: “file5.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042548,
“lastwritetime”: 1493042548,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file5\file5.exe”,
“size”: 15360
},
{
“attributes”: “Normal”,
“checksum”: “5ce533fa868945131afcea8885b8e94c94650106”,
“creationtime”: 1493044420,
“extension”: “.exe”,
“filename”: “file6.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493044420,
“lastwritetime”: 1493044420,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file6\file6.exe”,
“size”: 24064
}
],
“item”: {
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: true,
“checksum”: “b34dea1e77242a610f73b2a228e3d50a5ccb79ca”,
“dest”: “D:\\org\file1.zip”,
“item”: {
“_ansible_delegated_vars”: {
“ansible_host”: “localhost”
},
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: true,
“checksum_dest”: null,
“checksum_src”: “b34dea1e77242a610f73b2a228e3d50a5ccb79ca”,
“dest”: “/home/ec2-user/orgservers/downloads/file1.zip”,
“gid”: 500,
“group”: “ec2-user”,
“invocation”: {
“module_args”: {
“attributes”: null,
“backup”: false,
“checksum”: “”,
“content”: null,
“delimiter”: null,
“dest”: “/home/ec2-user/orgservers/downloads/file1.zip”,
“directory_mode”: null,
“follow”: false,
“force”: false,
“force_basic_auth”: false,
“group”: null,
“headers”: null,
“http_agent”: “ansible-httpget”,
“mode”: null,
“owner”: null,
“path”: “/home/ec2-user/orgservers/downloads/file1.zip”,
“regexp”: null,
“remote_src”: null,
“selevel”: null,
“serole”: null,
“setype”: null,
“seuser”: null,
“sha256sum”: “”,
“src”: null,
“timeout”: 10,
“tmp_dest”: “”,
“unsafe_writes”: null,
“url”: “http://url.com/private/v3/latest/file1.zip”,
“url_password”: “VALUE_SPECIFIED_IN_NO_LOG_PARAMETER”,
“url_username”: “org”,
“use_proxy”: true,
“validate_certs”: true
}
},
“item”: “file1.zip”,
“md5sum”: “70e88742bdca994ab6af7b3f1fd64b36”,
“mode”: “0664”,
“msg”: “OK (6810418 bytes)”,
“owner”: “ec2-user”,
“size”: 6810418,
“src”: “/tmp/tmpXBzMYP”,
“state”: “file”,
“status_code”: 200,
“uid”: 500,
“url”: “http://url.com/private/v3/latest/file1.zip
},
“operation”: “file_copy”,
“original_basename”: “source”,
“size”: 6810418,
“src”: “C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1493747350.73-232158969422777\source”
},
“matched”: 6
},
{
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: false,
“examined”: 248,
“files”: [
{
“attributes”: “Normal”,
“checksum”: “d55589f2c116bc66a050e7e91a7cf8f0d82e2ffb”,
“creationtime”: 1493042546,
“extension”: “.exe”,
“filename”: “file1.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042546,
“lastwritetime”: 1493042546,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file1\file1.exe”,
“size”: 22528
},
{
“attributes”: “Normal”,
“checksum”: “7f33b6cc2188a84f50eae660f6feaafcbb49c5c7”,
“creationtime”: 1493042578,
“extension”: “.exe”,
“filename”: “file2.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042578,
“lastwritetime”: 1493042578,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file2\file2.exe”,
“size”: 23552
},
{
“attributes”: “Normal”,
“checksum”: “cb8fe7af45fc52072c5faf38d742f37da1f30ee8”,
“creationtime”: 1493044416,
“extension”: “.exe”,
“filename”: “file3.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493044416,
“lastwritetime”: 1493044416,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file3\file3.exe”,
“size”: 13312
},
{
“attributes”: “Normal”,
“checksum”: “cafd70213b261a0fcbca9f3149b4a6c075757057”,
“creationtime”: 1493042570,
“extension”: “.exe”,
“filename”: “file4.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042570,
“lastwritetime”: 1493042570,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\p1\file4.exe”,
“size”: 96768
},
{
“attributes”: “Normal”,
“checksum”: “8311bdf39f3d2a95b324db7561ca5f308c89a5b0”,
“creationtime”: 1493042548,
“extension”: “.exe”,
“filename”: “file5.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042548,
“lastwritetime”: 1493042548,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file5\file5.exe”,
“size”: 15360
},
{
“attributes”: “Normal”,
“checksum”: “5ce533fa868945131afcea8885b8e94c94650106”,
“creationtime”: 1493044420,
“extension”: “.exe”,
“filename”: “file6.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493044420,
“lastwritetime”: 1493044420,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file6\file6.exe”,
“size”: 24064
}
],
“item”: {
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: true,
“checksum”: “4a0fd1be5f79002ec12ed40593ed448c5a0ec0a4”,
“dest”: “D:\\org\file3.zip”,
“item”: {
“_ansible_delegated_vars”: {
“ansible_host”: “localhost”
},
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: true,
“checksum_dest”: null,
“checksum_src”: “4a0fd1be5f79002ec12ed40593ed448c5a0ec0a4”,
“dest”: “/home/ec2-user/orgservers/downloads/file3.zip”,
“gid”: 500,
“group”: “ec2-user”,
“invocation”: {
“module_args”: {
“attributes”: null,
“backup”: false,
“checksum”: “”,
“content”: null,
“delimiter”: null,
“dest”: “/home/ec2-user/orgservers/downloads/file3.zip”,
“directory_mode”: null,
“follow”: false,
“force”: false,
“force_basic_auth”: false,
“group”: null,
“headers”: null,
“http_agent”: “ansible-httpget”,
“mode”: null,
“owner”: null,
“path”: “/home/ec2-user/orgservers/downloads/file3.zip”,
“regexp”: null,
“remote_src”: null,
“selevel”: null,
“serole”: null,
“setype”: null,
“seuser”: null,
“sha256sum”: “”,
“src”: null,
“timeout”: 10,
“tmp_dest”: “”,
“unsafe_writes”: null,
“url”: “http://url.com/private/v3/latest/file3.zip”,
“url_password”: “VALUE_SPECIFIED_IN_NO_LOG_PARAMETER”,
“url_username”: “org”,
“use_proxy”: true,
“validate_certs”: true
}
},
“item”: “file3.zip”,
“md5sum”: “45c578e9fcdeaee9edce9fd11fff794e”,
“mode”: “0664”,
“msg”: “OK (6806228 bytes)”,
“owner”: “ec2-user”,
“size”: 6806228,
“src”: “/tmp/tmphUgclD”,
“state”: “file”,
“status_code”: 200,
“uid”: 500,
“url”: “http://url.com/private/v3/latest/file3.zip
},
“operation”: “file_copy”,
“original_basename”: “source”,
“size”: 6806228,
“src”: “C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1493747361.76-58183967407241\source”
},
“matched”: 6
},
{
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: false,
“examined”: 248,
“files”: [
{
“attributes”: “Normal”,
“checksum”: “d55589f2c116bc66a050e7e91a7cf8f0d82e2ffb”,
“creationtime”: 1493042546,
“extension”: “.exe”,
“filename”: “file1.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042546,
“lastwritetime”: 1493042546,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file1\file1.exe”,
“size”: 22528
},
{
“attributes”: “Normal”,
“checksum”: “7f33b6cc2188a84f50eae660f6feaafcbb49c5c7”,
“creationtime”: 1493042578,
“extension”: “.exe”,
“filename”: “file2.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042578,
“lastwritetime”: 1493042578,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file2\file2.exe”,
“size”: 23552
},
{
“attributes”: “Normal”,
“checksum”: “cb8fe7af45fc52072c5faf38d742f37da1f30ee8”,
“creationtime”: 1493044416,
“extension”: “.exe”,
“filename”: “file3.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493044416,
“lastwritetime”: 1493044416,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file3\file3.exe”,
“size”: 13312
},
{
“attributes”: “Normal”,
“checksum”: “cafd70213b261a0fcbca9f3149b4a6c075757057”,
“creationtime”: 1493042570,
“extension”: “.exe”,
“filename”: “file4.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042570,
“lastwritetime”: 1493042570,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\p1\file4.exe”,
“size”: 96768
},
{
“attributes”: “Normal”,
“checksum”: “8311bdf39f3d2a95b324db7561ca5f308c89a5b0”,
“creationtime”: 1493042548,
“extension”: “.exe”,
“filename”: “file5.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042548,
“lastwritetime”: 1493042548,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file5\file5.exe”,
“size”: 15360
},
{
“attributes”: “Normal”,
“checksum”: “5ce533fa868945131afcea8885b8e94c94650106”,
“creationtime”: 1493044420,
“extension”: “.exe”,
“filename”: “file6.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493044420,
“lastwritetime”: 1493044420,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file6\file6.exe”,
“size”: 24064
}
],
“item”: {
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: true,
“checksum”: “49d4d720965fb2decd6f26c45000b64b53af2450”,
“dest”: “D:\\org\p1.zip”,
“item”: {
“_ansible_delegated_vars”: {
“ansible_host”: “localhost”
},
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: true,
“checksum_dest”: null,
“checksum_src”: “49d4d720965fb2decd6f26c45000b64b53af2450”,
“dest”: “/home/ec2-user/orgservers/downloads/p1.zip”,
“gid”: 500,
“group”: “ec2-user”,
“invocation”: {
“module_args”: {
“attributes”: null,
“backup”: false,
“checksum”: “”,
“content”: null,
“delimiter”: null,
“dest”: “/home/ec2-user/orgservers/downloads/p1.zip”,
“directory_mode”: null,
“follow”: false,
“force”: false,
“force_basic_auth”: false,
“group”: null,
“headers”: null,
“http_agent”: “ansible-httpget”,
“mode”: null,
“owner”: null,
“path”: “/home/ec2-user/orgservers/downloads/p1.zip”,
“regexp”: null,
“remote_src”: null,
“selevel”: null,
“serole”: null,
“setype”: null,
“seuser”: null,
“sha256sum”: “”,
“src”: null,
“timeout”: 10,
“tmp_dest”: “”,
“unsafe_writes”: null,
“url”: “http://url.com/private/v3/latest/p1.zip”,
“url_password”: “VALUE_SPECIFIED_IN_NO_LOG_PARAMETER”,
“url_username”: “org”,
“use_proxy”: true,
“validate_certs”: true
}
},
“item”: “p1.zip”,
“md5sum”: “3522b3179a699eb0b24058b2cb87f742”,
“mode”: “0664”,
“msg”: “OK (6838217 bytes)”,
“owner”: “ec2-user”,
“size”: 6838217,
“src”: “/tmp/tmpo3_OX6”,
“state”: “file”,
“status_code”: 200,
“uid”: 500,
“url”: “http://url.com/private/v3/latest/p1.zip
},
“operation”: “file_copy”,
“original_basename”: “source”,
“size”: 6838217,
“src”: “C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1493747372.6-32207996147302\source”
},
“matched”: 6
},
{
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: false,
“examined”: 248,
“files”: [
{
“attributes”: “Normal”,
“checksum”: “d55589f2c116bc66a050e7e91a7cf8f0d82e2ffb”,
“creationtime”: 1493042546,
“extension”: “.exe”,
“filename”: “file1.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042546,
“lastwritetime”: 1493042546,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file1\file1.exe”,
“size”: 22528
},
{
“attributes”: “Normal”,
“checksum”: “7f33b6cc2188a84f50eae660f6feaafcbb49c5c7”,
“creationtime”: 1493042578,
“extension”: “.exe”,
“filename”: “file2.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042578,
“lastwritetime”: 1493042578,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file2\file2.exe”,
“size”: 23552
},
{
“attributes”: “Normal”,
“checksum”: “cb8fe7af45fc52072c5faf38d742f37da1f30ee8”,
“creationtime”: 1493044416,
“extension”: “.exe”,
“filename”: “file3.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493044416,
“lastwritetime”: 1493044416,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file3\file3.exe”,
“size”: 13312
},
{
“attributes”: “Normal”,
“checksum”: “cafd70213b261a0fcbca9f3149b4a6c075757057”,
“creationtime”: 1493042570,
“extension”: “.exe”,
“filename”: “file4.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042570,
“lastwritetime”: 1493042570,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\p1\file4.exe”,
“size”: 96768
},
{
“attributes”: “Normal”,
“checksum”: “8311bdf39f3d2a95b324db7561ca5f308c89a5b0”,
“creationtime”: 1493042548,
“extension”: “.exe”,
“filename”: “file5.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042548,
“lastwritetime”: 1493042548,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file5\file5.exe”,
“size”: 15360
},
{
“attributes”: “Normal”,
“checksum”: “5ce533fa868945131afcea8885b8e94c94650106”,
“creationtime”: 1493044420,
“extension”: “.exe”,
“filename”: “file6.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493044420,
“lastwritetime”: 1493044420,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file6\file6.exe”,
“size”: 24064
}
],
“item”: {
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: true,
“checksum”: “21ceff314f6d901079dd9d9da84da5507f41287e”,
“dest”: “D:\\org\file6.zip”,
“item”: {
“_ansible_delegated_vars”: {
“ansible_host”: “localhost”
},
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: true,
“checksum_dest”: null,
“checksum_src”: “21ceff314f6d901079dd9d9da84da5507f41287e”,
“dest”: “/home/ec2-user/orgservers/downloads/file6.zip”,
“gid”: 500,
“group”: “ec2-user”,
“invocation”: {
“module_args”: {
“attributes”: null,
“backup”: false,
“checksum”: “”,
“content”: null,
“delimiter”: null,
“dest”: “/home/ec2-user/orgservers/downloads/file6.zip”,
“directory_mode”: null,
“follow”: false,
“force”: false,
“force_basic_auth”: false,
“group”: null,
“headers”: null,
“http_agent”: “ansible-httpget”,
“mode”: null,
“owner”: null,
“path”: “/home/ec2-user/orgservers/downloads/file6.zip”,
“regexp”: null,
“remote_src”: null,
“selevel”: null,
“serole”: null,
“setype”: null,
“seuser”: null,
“sha256sum”: “”,
“src”: null,
“timeout”: 10,
“tmp_dest”: “”,
“unsafe_writes”: null,
“url”: “http://url.com/private/v3/latest/file6.zip”,
“url_password”: “VALUE_SPECIFIED_IN_NO_LOG_PARAMETER”,
“url_username”: “org”,
“use_proxy”: true,
“validate_certs”: true
}
},
“item”: “file6.zip”,
“md5sum”: “6e85957250a768fe2504dddcc682cf0d”,
“mode”: “0664”,
“msg”: “OK (6824034 bytes)”,
“owner”: “ec2-user”,
“size”: 6824034,
“src”: “/tmp/tmpxVIMVD”,
“state”: “file”,
“status_code”: 200,
“uid”: 500,
“url”: “http://url.com/private/v3/latest/file6.zip
},
“operation”: “file_copy”,
“original_basename”: “source”,
“size”: 6824034,
“src”: “C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1493747383.48-198237657769424\source”
},
“matched”: 6
},
{
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: false,
“examined”: 248,
“files”: [
{
“attributes”: “Normal”,
“checksum”: “d55589f2c116bc66a050e7e91a7cf8f0d82e2ffb”,
“creationtime”: 1493042546,
“extension”: “.exe”,
“filename”: “file1.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042546,
“lastwritetime”: 1493042546,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file1\file1.exe”,
“size”: 22528
},
{
“attributes”: “Normal”,
“checksum”: “7f33b6cc2188a84f50eae660f6feaafcbb49c5c7”,
“creationtime”: 1493042578,
“extension”: “.exe”,
“filename”: “file2.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042578,
“lastwritetime”: 1493042578,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file2\file2.exe”,
“size”: 23552
},
{
“attributes”: “Normal”,
“checksum”: “cb8fe7af45fc52072c5faf38d742f37da1f30ee8”,
“creationtime”: 1493044416,
“extension”: “.exe”,
“filename”: “file3.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493044416,
“lastwritetime”: 1493044416,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file3\file3.exe”,
“size”: 13312
},
{
“attributes”: “Normal”,
“checksum”: “cafd70213b261a0fcbca9f3149b4a6c075757057”,
“creationtime”: 1493042570,
“extension”: “.exe”,
“filename”: “file4.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042570,
“lastwritetime”: 1493042570,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\p1\file4.exe”,
“size”: 96768
},
{
“attributes”: “Normal”,
“checksum”: “8311bdf39f3d2a95b324db7561ca5f308c89a5b0”,
“creationtime”: 1493042548,
“extension”: “.exe”,
“filename”: “file5.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493042548,
“lastwritetime”: 1493042548,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file5\file5.exe”,
“size”: 15360
},
{
“attributes”: “Normal”,
“checksum”: “5ce533fa868945131afcea8885b8e94c94650106”,
“creationtime”: 1493044420,
“extension”: “.exe”,
“filename”: “file6.exe”,
“isarchive”: false,
“isdir”: false,
“ishidden”: false,
“islnk”: false,
“isreadonly”: false,
“isshared”: false,
“lastaccesstime”: 1493044420,
“lastwritetime”: 1493044420,
“owner”: “BUILTIN\Administrators”,
“path”: “D:\path\Services\file6\file6.exe”,
“size”: 24064
}
],
“item”: {
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: true,
“checksum”: “a0d202e84276bbf0d5035f6397f8228f9366a09c”,
“dest”: “D:\\org\file2.zip”,
“item”: {
“_ansible_delegated_vars”: {
“ansible_host”: “localhost”
},
“_ansible_item_result”: true,
“_ansible_no_log”: false,
“_ansible_parsed”: true,
“changed”: true,
“checksum_dest”: null,
“checksum_src”: “a0d202e84276bbf0d5035f6397f8228f9366a09c”,
“dest”: “/home/ec2-user/orgservers/downloads/file2.zip”,
“gid”: 500,
“group”: “ec2-user”,
“invocation”: {
“module_args”: {
“attributes”: null,
“backup”: false,
“checksum”: “”,
“content”: null,
“delimiter”: null,
“dest”: “/home/ec2-user/orgservers/downloads/file2.zip”,
“directory_mode”: null,
“follow”: false,
“force”: false,
“force_basic_auth”: false,
“group”: null,
“headers”: null,
“http_agent”: “ansible-httpget”,
“mode”: null,
“owner”: null,
“path”: “/home/ec2-user/orgservers/downloads/file2.zip”,
“regexp”: null,
“remote_src”: null,
“selevel”: null,
“serole”: null,
“setype”: null,
“seuser”: null,
“sha256sum”: “”,
“src”: null,
“timeout”: 10,
“tmp_dest”: “”,
“unsafe_writes”: null,
“url”: “http://url.com/private/v3/latest/file2.zip”,
“url_password”: “VALUE_SPECIFIED_IN_NO_LOG_PARAMETER”,
“url_username”: “org”,
“use_proxy”: true,
“validate_certs”: true
}
},
“item”: “file2.zip”,
“md5sum”: “d2956e9040acf8cb066b8d9c9c3c07c7”,
“mode”: “0664”,
“msg”: “OK (6811485 bytes)”,
“owner”: “ec2-user”,
“size”: 6811485,
“src”: “/tmp/tmp5HclMY”,
“state”: “file”,
“status_code”: 200,
“uid”: 500,
“url”: “http://url.com/private/v3/latest/file2.zip
},
“operation”: “file_copy”,
“original_basename”: “source”,
“size”: 6811485,
“src”: “C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1493747394.21-79345240342517\source”
},
“matched”: 6
}
]
}
}

It would be worth showing the tasks in your playbook too, as well as the output.

Worth experimenting with debug. Also it might be worth trying the json_path filter (see the Filters page on the documentation site) as this can reduce complex json into simpler structures.

Hope this helps,

Jon

It may be enough to do:

with_items: “{{ exepath.results|map(attribute=‘files’) }}”

and i need to call item.filename and item.path? i tried it , but it does not work

The error was: ‘ansible.vars.unsafe_proxy.AnsibleUnsafeText object’ has no attribute ‘path’\