[ansible-project] Re: win_get_url always failing first time
Thanks Jordan. I'm running ansible 2.4.0.0 on CentOS trying to download a file using win_get_url like this - name: Download file win_get_url: url: http://servername/Ansible/USA/file.zip dest: "{{ ansible_env.TEMP }}\\file.zip" when: zip_file.stat.exists == True I can't find any entry in the server logs, and am mostly confused as to why it just happens the first time each day but not all others after that. On Wednesday, 7 March 2018 13:15:24 UTC-8, Jordan Borean wrote: > > Are you able to share some more info like the Ansible version you are on, > the task you are running. A 500 status code means internal error (internal > to the http server) and usually indicates a problem on the remote end. You > need to be able to debug what is happened in the times of a 500 error to > determine what is happening, there is not much we can do from there. > > Thanks > > Jordan > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b12d7beb-ee7a-49b5-b1d7-2e4cccf95a9b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: Copy module
My copy speeds greatly increased when I moved the package source to the same datacenter as the target resources. Could it be a location issue where your network speed gets throttled? On Tuesday, 6 March 2018 13:05:15 UTC-8, Malcolm Hussain-Gambles wrote: > > I'm using ansible to build a package in Jenkins and the make an rpm. > The copy function takes 20+ minutes to copy a few files. Using the command > function takes under a second. > The synchronize function is generally unusable (better off using rsync > from command) > > I was wondering what other people's experiences are with copy and > synchronize. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/052914da-5ee7-4ba7-87de-d1da13f72c38%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: win_get_url always failing first time
P.s. I have already doubled the winrm read and action timeout in the group_vars but the issue persists. Any advice is welcome. When I browse the website manually from chrome it loads fine. On Wednesday, 7 March 2018 08:46:51 UTC-8, Thijn Bukkems wrote: > > Hey guys, > > I run into an issue where my win_get_url always fails with the error "The > remote server returned an error: (500) Internal Server Error.", > "status_code": 500," the first time it is run each night. If I run the > playbook again a couple minutes later the files download successfully. Does > anyone have experience with this and can point me in the right direction > figuring this out? The server is available, as the second attempt works > flawlessly. > > Thanks > Thijn > > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/dcb1661f-96ee-4060-9866-13b4ad079927%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] win_get_url always failing first time
Hey guys, I run into an issue where my win_get_url always fails with the error "The remote server returned an error: (500) Internal Server Error.", "status_code": 500," the first time it is run each night. If I run the playbook again a couple minutes later the files download successfully. Does anyone have experience with this and can point me in the right direction figuring this out? The server is available, as the second attempt works flawlessly. Thanks Thijn -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/57ab5c6d-4118-4559-9700-a67b0897d773%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: Unable to do basic win_ping from CentOS7 to Windows 2012
Thanks guys, I changed to fqdn shortly after that original post. Strangely enough now only getting access denied with 1 machine even though the winrm settings and user accounts on both are exactly the same. they even reside in the same subnet. very strange! Op donderdag 31 augustus 2017 02:54:28 UTC-7 schreef J Hawkesworth: > > Well spotted! Yeah, use hostnames. If you end up switching over to using > kerberos hostnames are essential (as is fully functioning DNS lookups (both > hostname -> ip and ip -> hostname). > > Jon > > On Thursday, August 31, 2017 at 10:51:01 AM UTC+1, sohail.p...@gmail.com > wrote: >> >> >> Use windows fqdn name in place of IPaddress then it will work >> >> On Wednesday, August 30, 2017 at 10:21:48 PM UTC+5:30, Thijn Bukkems >> wrote: >>> >>> Hi all, >>> >>> Just getting started with Ansible as proof of concept but already stuck >>> and not sure how to make it work. I have a CentOS7 box that is not on the >>> domain but on the same network and 2 Windows 2012 R2 servers. >>> >>> I ran the ConfigurePowerShellForAnsible.ps1 scripts on both servers as >>> admin, as suggested. I set up a local account named 'ansibleadmin' on both >>> servers. >>> >>> This is the output I get when trying to win_ping the servers: >>> >>>> [admin@localhost ansible]$ ansible web -m win_ping >>>> >>>> [WARNING]: ansible_winrm_cert_validation unsupported by pywinrm (is an >>>>> up-to-date version of pywinrm installed?) >>>> >>>> >>>>> [WARNING]: ansible_winrm_cert_validation unsupported by pywinrm (is >>>>> an up-to-date version of pywinrm installed?) >>>> >>>> >>>>> 10.128.2.108 | UNREACHABLE! => { >>>> >>>> "changed": false, >>>> >>>> "msg": "plaintext: the specified credentials were rejected by the >>>>> server", >>>> >>>> "unreachable": true >>>> >>>> } >>>> >>>> 10.128.2.215 | UNREACHABLE! => { >>>> >>>> "changed": false, >>>> >>>> "msg": "plaintext: the specified credentials were rejected by the >>>>> server", >>>> >>>> "unreachable": true >>>> >>>> } >>>> >>>> >>> Some background information regarding my inventory files etc: >>> inventory.yml: >>> >>>> >>>> --- >>>> [web] >>>> 10.128.2.215 >>>> 10.128.2.108 >>> >>> >>> >>> group_vars/web.yml: >>> >>>> --- >>>> ansible_user: ansibleadmin >>>> ansible_password: Passw0rd >>>> ansible_port: 5985 >>>> ansible_connection: winrm >>>> ansible_winrm_cert_validation: ignore >>> >>> >>> >>> ansible.cfg: >>> >>>> [defaults] >>>> inventory = /etc/ansible/inventory.yml >>> >>> >>> >>> Versions: >>> Pywinrm 0.2.2 >>> Python 2.7.5 >>> Ansible 2.3.1.0 >>> CentOS 7.3.1611 (Core) >>> >>> >>> I have no clue why I can't get it to work with a local account and am >>> hesitant to move on to kerberos AD authentication if I can't even get this >>> to work. Any advice? >>> >> -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4881312d-4699-4c26-8db2-172b876be9b3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: Unable to do basic win_ping from CentOS7 to Windows 2012
command line: ansible web -m win_service -a "name=spooler state=stopped" Op donderdag 31 augustus 2017 02:27:02 UTC-7 schreef J Hawkesworth: > > Please share your playbook or command line > > On Wednesday, August 30, 2017 at 11:23:35 PM UTC+1, Thijn Bukkems wrote: >> >> Also tried to stop or start the print spooler just to test another >> command.. This is what's in the log >> >> 2017-08-30 17:19:53,300 urllib3.connectionpool Starting new HTTPS >> connection (1): .domain >> 2017-08-30 17:19:53,314 urllib3.connectionpool Starting new HTTPS >> connection (1): .domain >> 2017-08-30 17:19:53,350 urllib3.connectionpool https://.domainl:5986 >> "POST /wsman HTTP/1.1" 401 0 >> 2017-08-30 17:19:53,352 urllib3.connectionpool Resetting dropped >> connection: .domain >> 2017-08-30 17:19:53,363 urllib3.connectionpool https://.domain:5986 >> "POST /wsman HTTP/1.1" 401 0 >> 2017-08-30 17:19:53,365 urllib3.connectionpool Resetting dropped >> connection: .domain >> 2017-08-30 17:19:53,402 urllib3.connectionpool https:.domain:5986 >> "POST /wsman HTTP/1.1" 401 0 >> 2017-08-30 17:19:53,415 urllib3.connectionpool https:/.domainl:5986 >> "POST /wsman HTTP/1.1" 401 0 >> 2017-08-30 17:19:53,523 urllib3.connectionpool https://.domainl:5986 >> "POST /wsman HTTP/1.1" 200 1640 >> 2017-08-30 17:19:53,532 urllib3.connectionpool https://.domain:5986 >> "POST /wsman HTTP/1.1" 200 847 >> 2017-08-30 17:19:53,610 urllib3.connectionpool https:.domainl:5986 >> "POST /wsman HTTP/1.1" 200 1640 >> 2017-08-30 17:19:53,619 urllib3.connectionpool https://.domain:5986 >> "POST /wsman HTTP/1.1" 200 847 >> 2017-08-30 17:19:53,795 urllib3.connectionpool https:/.domainl:5986 >> "POST /wsman HTTP/1.1" 200 753 >> 2017-08-30 17:19:53,883 urllib3.connectionpool https://.domainl:5986 >> "POST /wsman HTTP/1.1" 200 753 >> 2017-08-30 17:19:59,803 urllib3.connectionpool https://.domainl:5986 >> "POST /wsman HTTP/1.1" 200 2563 >> 2017-08-30 17:19:59,809 urllib3.connectionpool https:/.domain:5986 >> "POST /wsman HTTP/1.1" 200 757 >> 2017-08-30 17:19:59,815 urllib3.connectionpool https:/.domainl:5986 >> "POST /wsman HTTP/1.1" 200 602 >> 2017-08-30 17:19:59,822 p=5178 u=root | .domain | FAILED! => { >> "changed": false, >> "failed": true, >> "module_stderr": "Exception calling \"Run\" with \"1\" argument(s): >> \"Exception calling \"Invoke\" with \r\n\"0\" argument(s): \"The running >> command st$"module_stdout": "", >> "msg": "MODULE FAILURE", >> "rc": 1 >> } >> 2017-08-30 17:19:59,899 urllib3.connectionpool https://n.domainl:5986 >> "POST /wsman HTTP/1.1" 200 2563 >> 2017-08-30 17:19:59,905 urllib3.connectionpool https:/.domainal:5986 >> "POST /wsman HTTP/1.1" 200 757 >> 2017-08-30 17:19:59,911 urllib3.connectionpool https://.domainl:5986 >> "POST /wsman HTTP/1.1" 200 602 >> 2017-08-30 17:19:59,916 p=5178 u=root | .domain | FAILED! => { >> "changed": false, >> "failed": true, >> "module_stderr": "Exception calling \"Run\" with \"1\" argument(s): >> \"Exception calling \"Invoke\" with \r\n\"0\" argument(s): \"The running >> command st$"module_stdout": "", >> "msg": "MODULE FAILURE", >> "rc": 1 >> } >> > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4c4adb73-85a5-4dc3-9100-dcb9ce2c7c2a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: Unable to do basic win_ping from CentOS7 to Windows 2012
The folder structure looks like this /etc/ansible: ansible.cfg inventory.yml /etc/ansible/group_vars/: web.yml I haven't configured the ansible.cfg in /etc/ansible regarding the cert validation. Op donderdag 31 augustus 2017 02:26:34 UTC-7 schreef J Hawkesworth: > > Its odd that you are getting the insecure request warnings - I am > wondering if you are running ansible from a folder with a different > ansible.cfg in it perhaps, as the ansible_winrm_server_cert_validation: > ignore doesn't seem to be taking effect. > > On Wednesday, August 30, 2017 at 10:55:31 PM UTC+1, Thijn Bukkems wrote: >> >> Not sure if you would know the answer to this and I should probably start >> a new thread but for some reason the -m setup command doesn't return any >> values. When run, it looks like I'm getting an empty array. P.s. I blanked >> out hostnames for security reasons >> >> [admin@localhost ansible]$ ansible -m setup web >>> /usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: >>> InsecureRequestWarning: Unverified HTTPS request is being made. Adding >>> certificate verification is strongly advised. See: >>> https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings >>> InsecureRequestWarning) >>> /usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: >>> InsecureRequestWarning: Unverified HTTPS request is being made. Adding >>> certificate verification is strongly advised. See: >>> https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings >>> InsecureRequestWarning) >>> XXX.domain.local | SUCCESS => { >>> "ansible_facts": {}, >>> "changed": false >>> } >>> XXX.domain.local | SUCCESS => { >>> "ansible_facts": {}, >>> "changed": false >>> } >> >> -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/60b8d5d0-13d8-4a54-8458-fdc5d511d6f6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: Unable to do basic win_ping from CentOS7 to Windows 2012
Not sure if you would know the answer to this and I should probably start a new thread but for some reason the -m setup command doesn't return any values. When run, it looks like I'm getting an empty array. P.s. I blanked out hostnames for security reasons [admin@localhost ansible]$ ansible -m setup web > /usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: > InsecureRequestWarning: Unverified HTTPS request is being made. Adding > certificate verification is strongly advised. See: > https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings > InsecureRequestWarning) > /usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: > InsecureRequestWarning: Unverified HTTPS request is being made. Adding > certificate verification is strongly advised. See: > https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings > InsecureRequestWarning) > XXX.domain.local | SUCCESS => { > "ansible_facts": {}, > "changed": false > } > XXX.domain.local | SUCCESS => { > "ansible_facts": {}, > "changed": false > } -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/456897b7-9948-46a6-b01f-6aabc7ac135c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Unable to do basic win_ping from CentOS7 to Windows 2012
Hi all, Just getting started with Ansible as proof of concept but already stuck and not sure how to make it work. I have a CentOS7 box that is not on the domain but on the same network and 2 Windows 2012 R2 servers. I ran the ConfigurePowerShellForAnsible.ps1 scripts on both servers as admin, as suggested. I set up a local account named 'ansibleadmin' on both servers. This is the output I get when trying to win_ping the servers: > [admin@localhost ansible]$ ansible web -m win_ping > > [WARNING]: ansible_winrm_cert_validation unsupported by pywinrm (is an >> up-to-date version of pywinrm installed?) > > >> [WARNING]: ansible_winrm_cert_validation unsupported by pywinrm (is an >> up-to-date version of pywinrm installed?) > > >> 10.128.2.108 | UNREACHABLE! => { > > "changed": false, > > "msg": "plaintext: the specified credentials were rejected by the >> server", > > "unreachable": true > > } > > 10.128.2.215 | UNREACHABLE! => { > > "changed": false, > > "msg": "plaintext: the specified credentials were rejected by the >> server", > > "unreachable": true > > } > > Some background information regarding my inventory files etc: inventory.yml: > > --- > [web] > 10.128.2.215 > 10.128.2.108 group_vars/web.yml: > --- > ansible_user: ansibleadmin > ansible_password: Passw0rd > ansible_port: 5985 > ansible_connection: winrm > ansible_winrm_cert_validation: ignore ansible.cfg: > [defaults] > inventory = /etc/ansible/inventory.yml Versions: Pywinrm 0.2.2 Python 2.7.5 Ansible 2.3.1.0 CentOS 7.3.1611 (Core) I have no clue why I can't get it to work with a local account and am hesitant to move on to kerberos AD authentication if I can't even get this to work. Any advice? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9a2325d6-868e-42e7-ac95-e66d317a8458%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.