---# tasks file for packages- name: hosts: windows tasks: - name: Get XML file if newer win_get_url: dest: 'C:\temp\testfile.xml' force: no
HTTP/1.1 200 OKContent-Length: 123Content-Type: text/xmlLast-Modified: Wed, 05 Apr 2017 13:27:23 GMTAccept-Ranges: bytesETag: "d9df35b10aed21:0"Server: Microsoft-IIS/7.5X-Powered-By: ASP.NETDate: Wed, 05 Apr 2017 20:16:03 GMT
changed: [winserver1.foo.com] => { "changed": true, "invocation": { "module_name": "win_get_url" }, "win_get_url": { "dest": "C:\\temp\\testfile.xml", }}ok: [winserver1.foo.com] => { "changed": false, "invocation": { "module_name": "win_get_url" }, "win_get_url": { "dest": "C:\\temp\\testfile.xml", }}
HTTP/1.1 200 OKContent-Length: 150Content-Type: text/xmlLast-Modified: Wed, 05 Apr 2017 20:17:46 GMTAccept-Ranges: bytesETag: W/"b7d256b049aed21:0"Server: Microsoft-IIS/7.5X-Powered-By: ASP.NETDate: Wed, 05 Apr 2017 20:17:48 GMT
ok: [winserver1.foo.com] => { "changed": false, "invocation": { "module_name": "win_get_url" }, "win_get_url": { "dest": "C:\\temp\\testfile.xml", }}
# dateWed Apr 5 18:29:13 EDT 2017
# curl -I http://windc1.foo.com/shares/test.txtHTTP/1.1 200 OKContent-Length: 5Content-Type: text/plainLast-Modified: Wed, 05 Apr 2017 22:27:16 GMTAccept-Ranges: bytesETag: "bb360c85baed21:0"Server: Microsoft-IIS/7.5X-Powered-By: ASP.NETDate: Wed, 05 Apr 2017 22:30:06 GMT
# dateWed Apr 5 18:30:59 EDT 2017
ok: [winserver1.foo.com] => { "changed": false, "invocation": { "module_name": "win_get_url" }, "win_get_url": { "dest": "C:\\temp\\testfile.xml", changed: [winserver1.foo.com] => { "changed": true, "invocation": { "module_name": "win_get_url" }, "win_get_url": { "dest": "C:\\temp\\test.txt", }}
PLAY RECAP *********************************************************************winserver1.foo.com : ok=2 changed=1 unreachable=0 failed=0 HTTP/1.1 200 OKContent-Length: 5Content-Type: text/plainLast-Modified: Wed, 05 Apr 2017 22:27:16 GMTAccept-Ranges: bytesETag: "bb360c85baed21:0"Server: Microsoft-IIS/7.5X-Powered-By: ASP.NETDate: Wed, 05 Apr 2017 22:36:22 GMT
# dateWed Apr 5 18:40:13 EDT 2017
# curl -I http://windc1.foo.com/shares/test.txtHTTP/1.1 200 OKContent-Length: 16Content-Type: text/plainLast-Modified: Wed, 05 Apr 2017 22:36:47 GMTAccept-Ranges: bytesETag: "e1d1181c5daed21:0"Server: Microsoft-IIS/7.5X-Powered-By: ASP.NETDate: Wed, 05 Apr 2017 22:41:06 GMT
ok: [winserver1.foo.com] => { "changed": false, "invocation": { "module_name": "win_get_url" }, "win_get_url": {