[ansible-project] Re: ansible debug troubleshooting - script failing

2020-07-08 Thread stack flow
I also keep on getting following msgs:

TASK [show hostname] 

Wednesday 08 July 2020  21:12:10 -0400 (0:00:00.090)   0:00:00.090 
 
*[WARNING]: Platform darwin on host iosv-2 is using the discovered Python 
interpreter at /usr/bin/python, but future installation*
*of another Python interpreter could change this. See*
*https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html
 
for more information.*
*fatal: [iosv-2]: FAILED! => {"ansible_facts": 
{"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, 
"msg": "[Errno None] Unable to connect to port 22 on 10.10.100.31"}*


On Wednesday, July 8, 2020 at 9:09:33 PM UTC-4, stack flow wrote:
>
>
> Hello, I am new to ansible and its troubleshooting. my ansible script is 
> failing. below is output. could you advise why is the script failing?
>
>
>
>
> *<10.10.100.59> attempting to start connection*
> *<10.10.100.59> using connection plugin network_cli*
> *<10.10.100.31> attempting to start connection*
> *<10.10.100.31> using connection plugin network_cli*
> *<10.10.100.59> local domain socket does not exist, starting it*
> *<10.10.100.59> control socket path is /Users/ljamm/.ansible/pc/f58522fe09*
> *<10.10.100.59> local domain socket listeners started successfully*
> *<10.10.100.31> local domain socket does not exist, starting it*
> *<10.10.100.59> loaded cliconf plugin ios from path 
> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/plugins/cliconf/ios.py
>  
> for network_os ios*
> *<10.10.100.31> control socket path is /Users/ljamm/.ansible/pc/91c938f5a6*
> *<10.10.100.59>*
> *<10.10.100.31> local domain socket listeners started successfully*
> *<10.10.100.59> local domain socket path is 
> /Users/ljamm/.ansible/pc/f58522fe09*
> *<10.10.100.31> loaded cliconf plugin ios from path 
> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/plugins/cliconf/ios.py
>  
> for network_os ios*
> *<10.10.100.31>*
> *<10.10.100.31> local domain socket path is 
> /Users/ljamm/.ansible/pc/91c938f5a6*
> *[WARNING]: Ignoring timeout(10) for ios_facts*
> *[WARNING]: Ignoring timeout(10) for ios_facts*
> * Attempting python interpreter discovery*
> * Attempting python interpreter discovery*
> *<10.10.100.59> ESTABLISH LOCAL CONNECTION FOR USER: ljamm*
> *<10.10.100.59> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command 
> -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; command -v 
> '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v 
> '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v 
> '"'"'/usr/libexec/platform-python'"'"'; command -v 
> '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && 
> sleep 0'*
> *<10.10.100.31> ESTABLISH LOCAL CONNECTION FOR USER: ljamm*
> *<10.10.100.31> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command 
> -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; command -v 
> '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v 
> '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v 
> '"'"'/usr/libexec/platform-python'"'"'; command -v 
> '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && 
> sleep 0'*
> * Python interpreter discovery fallback (unsupported platform for 
> extended discovery: darwin)*
> *Using module file 
> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/modules/network/ios/ios_facts.py*
> * Python interpreter discovery fallback (unsupported platform for 
> extended discovery: darwin)*
> *Pipelining is enabled.*
> *<10.10.100.59> EXEC /bin/sh -c '/usr/bin/python && sleep 0'*
> *Using module file 
> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/modules/network/ios/ios_facts.py*
> *Pipelining is enabled.*
> *<10.10.100.31> EXEC /bin/sh -c '/usr/bin/python && sleep 0'*
> *fatal: [iosv-1]: FAILED! => {*
> *"ansible_facts": {},*
> *"changed": false,*
> *"failed_modules": {*
> *"ios_facts": {*
> *"ansible_facts": {*
> *"discovered_interpreter_python": "/usr/bin/python"*
> *},*
> *"exception": "WARNING: The below traceback may *not* be 
> related to the actual failure.\n  File 
> \"/var/folders/l8/gjnzx82j2fbd8dqjdxvmx794gn/T/ansible_ios_facts_payload_rig_Ih/ansible_ios_facts_payload.zip/ansible/module_utils/network/common/network.py\",
>  
> line 229, in get_capabilities\ncapabilities = 
> Connection(module._socket_path).get_capabilities()\n  File 
> \"/var/folders/l8/gjnzx82j2fbd8dqjdxvmx794gn/T/ansible_ios_facts_payload_rig_Ih/ansible_ios_facts_payload.zip/ansible/module_utils/connection.py\",
>  
> line 185, in __rpc__\nraise ConnectionError(to_text(msg, 
> errors='surrogate_then_replace'), code=code)\n",*
> * 

[ansible-project] Re: ansible debug troubleshooting - script failing

2020-07-08 Thread ameya agashe
This is a network related issue, and not related to ansible:

*Unable to connect to port 22 on 10.10.100.31"*

>From Ansible controller try to ping or do telnet on the above machine on 
port 22 and past the output here.

Example:
telnet 10.10.100.31 22

You are not able to reach that machine, that is causing the grief.

Regards,
Ameya


On Thursday, 9 July 2020 11:14:09 UTC+10, stack flow wrote:
>
> I also keep on getting following msgs:
>
> TASK [show hostname] 
> 
> Wednesday 08 July 2020  21:12:10 -0400 (0:00:00.090)   0:00:00.090 
>  
> *[WARNING]: Platform darwin on host iosv-2 is using the discovered Python 
> interpreter at /usr/bin/python, but future installation*
> *of another Python interpreter could change this. See*
> *https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html
>  
> 
>  
> for more information.*
> *fatal: [iosv-2]: FAILED! => {"ansible_facts": 
> {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, 
> "msg": "[Errno None] Unable to connect to port 22 on 10.10.100.31"}*
>
>
> On Wednesday, July 8, 2020 at 9:09:33 PM UTC-4, stack flow wrote:
>>
>>
>> Hello, I am new to ansible and its troubleshooting. my ansible script is 
>> failing. below is output. could you advise why is the script failing?
>>
>>
>>
>>
>> *<10.10.100.59> attempting to start connection*
>> *<10.10.100.59> using connection plugin network_cli*
>> *<10.10.100.31> attempting to start connection*
>> *<10.10.100.31> using connection plugin network_cli*
>> *<10.10.100.59> local domain socket does not exist, starting it*
>> *<10.10.100.59> control socket path is 
>> /Users/ljamm/.ansible/pc/f58522fe09*
>> *<10.10.100.59> local domain socket listeners started successfully*
>> *<10.10.100.31> local domain socket does not exist, starting it*
>> *<10.10.100.59> loaded cliconf plugin ios from path 
>> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/plugins/cliconf/ios.py
>>  
>> for network_os ios*
>> *<10.10.100.31> control socket path is 
>> /Users/ljamm/.ansible/pc/91c938f5a6*
>> *<10.10.100.59>*
>> *<10.10.100.31> local domain socket listeners started successfully*
>> *<10.10.100.59> local domain socket path is 
>> /Users/ljamm/.ansible/pc/f58522fe09*
>> *<10.10.100.31> loaded cliconf plugin ios from path 
>> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/plugins/cliconf/ios.py
>>  
>> for network_os ios*
>> *<10.10.100.31>*
>> *<10.10.100.31> local domain socket path is 
>> /Users/ljamm/.ansible/pc/91c938f5a6*
>> *[WARNING]: Ignoring timeout(10) for ios_facts*
>> *[WARNING]: Ignoring timeout(10) for ios_facts*
>> * Attempting python interpreter discovery*
>> * Attempting python interpreter discovery*
>> *<10.10.100.59> ESTABLISH LOCAL CONNECTION FOR USER: ljamm*
>> *<10.10.100.59> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; 
>> command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; 
>> command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v 
>> '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v 
>> '"'"'/usr/libexec/platform-python'"'"'; command -v 
>> '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && 
>> sleep 0'*
>> *<10.10.100.31> ESTABLISH LOCAL CONNECTION FOR USER: ljamm*
>> *<10.10.100.31> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; 
>> command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; 
>> command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v 
>> '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v 
>> '"'"'/usr/libexec/platform-python'"'"'; command -v 
>> '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && 
>> sleep 0'*
>> * Python interpreter discovery fallback (unsupported platform for 
>> extended discovery: darwin)*
>> *Using module file 
>> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/modules/network/ios/ios_facts.py*
>> * Python interpreter discovery fallback (unsupported platform for 
>> extended discovery: darwin)*
>> *Pipelining is enabled.*
>> *<10.10.100.59> EXEC /bin/sh -c '/usr/bin/python && sleep 0'*
>> *Using module file 
>> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/modules/network/ios/ios_facts.py*
>> *Pipelining is enabled.*
>> *<10.10.100.31> EXEC /bin/sh -c '/usr/bin/python && sleep 0'*
>> *fatal: [iosv-1]: FAILED! => {*
>> *"ansible_facts": {},*
>> *"changed": false,*
>> *"failed_modules": {*
>> *"ios_facts": {*
>> *"ansible_facts": {*
>> *"discovered_interpreter_python": "/usr/bin/python"*
>> *},*
>> *"exception": "WARNING: The below traceback may *not* be 
>

[ansible-project] Re: ansible debug troubleshooting - script failing

2020-07-08 Thread stack flow
Thx. I was able to ssh from command line so this isn't network issue. is it 
because of python?

TASK [show hostname] 

Wednesday 08 July 2020  21:12:10 -0400 (0:00:00.090)   0:00:00.090 
 
*[WARNING]: Platform darwin on host iosv-2 is using the discovered Python 
interpreter at /usr/bin/python, but future installation*
*of another Python interpreter could change this. See*
*https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html
 

 for 
more information.*
*fatal: [iosv-2]: FAILED! => {"ansible_facts": 
{"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, 
"msg": "[Errno None] Unable to connect to port 22 on 10.10.100.31"}*


 is it because of python? see below.

*ljamm@ljamm 2_templates_conditionals % ansible --version*
*ansible 2.9.10*
*  config file = /etc/ansible/ansible.cfg*
*  configured module search path = 
['/Users/ljamm/.ansible/plugins/modules', 
'/usr/share/ansible/plugins/modules']*
*  ansible python module location = 
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible*
*  executable location = 
/Library/Frameworks/Python.framework/Versions/3.7/bin/ansible*
*  python version = 3.7.7 (v3.7.7:d7c567b08f, Mar 10 2020, 02:56:16) [Clang 
6.0 (clang-600.0.57)]*
*ljamm@ljamm 2_templates_conditionals %*
*ljamm@ljamm 2_templates_conditionals % python --version*
*Python 2.7.16*
*ljamm@ljamm 2_templates_conditionals %*

On Wednesday, July 8, 2020 at 10:24:30 PM UTC-4, ameya agashe wrote:
>
> This is a network related issue, and not related to ansible:
>
> *Unable to connect to port 22 on 10.10.100.31"*
>
> From Ansible controller try to ping or do telnet on the above machine on 
> port 22 and past the output here.
>
> Example:
> telnet 10.10.100.31 22
>
> You are not able to reach that machine, that is causing the grief.
>
> Regards,
> Ameya
>
>
> On Thursday, 9 July 2020 11:14:09 UTC+10, stack flow wrote:
>>
>> I also keep on getting following msgs:
>>
>> TASK [show hostname] 
>> 
>> Wednesday 08 July 2020  21:12:10 -0400 (0:00:00.090)   0:00:00.090 
>>  
>> *[WARNING]: Platform darwin on host iosv-2 is using the discovered Python 
>> interpreter at /usr/bin/python, but future installation*
>> *of another Python interpreter could change this. See*
>> *https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html
>>  
>> 
>>  
>> for more information.*
>> *fatal: [iosv-2]: FAILED! => {"ansible_facts": 
>> {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, 
>> "msg": "[Errno None] Unable to connect to port 22 on 10.10.100.31"}*
>>
>>
>> On Wednesday, July 8, 2020 at 9:09:33 PM UTC-4, stack flow wrote:
>>>
>>>
>>> Hello, I am new to ansible and its troubleshooting. my ansible script is 
>>> failing. below is output. could you advise why is the script failing?
>>>
>>>
>>>
>>>
>>> *<10.10.100.59> attempting to start connection*
>>> *<10.10.100.59> using connection plugin network_cli*
>>> *<10.10.100.31> attempting to start connection*
>>> *<10.10.100.31> using connection plugin network_cli*
>>> *<10.10.100.59> local domain socket does not exist, starting it*
>>> *<10.10.100.59> control socket path is 
>>> /Users/ljamm/.ansible/pc/f58522fe09*
>>> *<10.10.100.59> local domain socket listeners started successfully*
>>> *<10.10.100.31> local domain socket does not exist, starting it*
>>> *<10.10.100.59> loaded cliconf plugin ios from path 
>>> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/plugins/cliconf/ios.py
>>>  
>>> for network_os ios*
>>> *<10.10.100.31> control socket path is 
>>> /Users/ljamm/.ansible/pc/91c938f5a6*
>>> *<10.10.100.59>*
>>> *<10.10.100.31> local domain socket listeners started successfully*
>>> *<10.10.100.59> local domain socket path is 
>>> /Users/ljamm/.ansible/pc/f58522fe09*
>>> *<10.10.100.31> loaded cliconf plugin ios from path 
>>> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/plugins/cliconf/ios.py
>>>  
>>> for network_os ios*
>>> *<10.10.100.31>*
>>> *<10.10.100.31> local domain socket path is 
>>> /Users/ljamm/.ansible/pc/91c938f5a6*
>>> *[WARNING]: Ignoring timeout(10) for ios_facts*
>>> *[WARNING]: Ignoring timeout(10) for ios_facts*
>>> * Attempting python interpreter discovery*
>>> * Attempting python interpreter discovery*
>>> *<10.10.100.59> ESTABLISH LOCAL CONNECTION FOR USER: ljamm*
>>> *<10.10.100.59> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; 
>>> command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; 
>>> command -v '"'"'python3.6'"'"'

Re: [ansible-project] Re: ansible debug troubleshooting - script failing

2020-07-08 Thread Srinivas Naram
https://docs.ansible.com/ansible/latest/user_guide/connection_details.html

On Thu, Jul 9, 2020 at 8:36 AM stack flow  wrote:

> Thx. I was able to ssh from command line so this isn't network issue. is
> it because of python?
>
> TASK [show hostname]
> 
> Wednesday 08 July 2020  21:12:10 -0400 (0:00:00.090)   0:00:00.090
> 
> *[WARNING]: Platform darwin on host iosv-2 is using the discovered Python
> interpreter at /usr/bin/python, but future installation*
> *of another Python interpreter could change this. See*
> *https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html
> 
>  for
> more information.*
> *fatal: [iosv-2]: FAILED! => {"ansible_facts":
> {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false,
> "msg": "[Errno None] Unable to connect to port 22 on 10.10.100.31"}*
>
>
>  is it because of python? see below.
>
> *ljamm@ljamm 2_templates_conditionals % ansible --version*
> *ansible 2.9.10*
> *  config file = /etc/ansible/ansible.cfg*
> *  configured module search path =
> ['/Users/ljamm/.ansible/plugins/modules',
> '/usr/share/ansible/plugins/modules']*
> *  ansible python module location =
> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible*
> *  executable location =
> /Library/Frameworks/Python.framework/Versions/3.7/bin/ansible*
> *  python version = 3.7.7 (v3.7.7:d7c567b08f, Mar 10 2020, 02:56:16)
> [Clang 6.0 (clang-600.0.57)]*
> *ljamm@ljamm 2_templates_conditionals %*
> *ljamm@ljamm 2_templates_conditionals % python --version*
> *Python 2.7.16*
> *ljamm@ljamm 2_templates_conditionals %*
>
> On Wednesday, July 8, 2020 at 10:24:30 PM UTC-4, ameya agashe wrote:
>>
>> This is a network related issue, and not related to ansible:
>>
>> *Unable to connect to port 22 on 10.10.100.31"*
>>
>> From Ansible controller try to ping or do telnet on the above machine on
>> port 22 and past the output here.
>>
>> Example:
>> telnet 10.10.100.31 22
>>
>> You are not able to reach that machine, that is causing the grief.
>>
>> Regards,
>> Ameya
>>
>>
>> On Thursday, 9 July 2020 11:14:09 UTC+10, stack flow wrote:
>>>
>>> I also keep on getting following msgs:
>>>
>>> TASK [show hostname]
>>> 
>>> Wednesday 08 July 2020  21:12:10 -0400 (0:00:00.090)   0:00:00.090
>>> 
>>> *[WARNING]: Platform darwin on host iosv-2 is using the discovered
>>> Python interpreter at /usr/bin/python, but future installation*
>>> *of another Python interpreter could change this. See*
>>> *https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html
>>> 
>>> for more information.*
>>> *fatal: [iosv-2]: FAILED! => {"ansible_facts":
>>> {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false,
>>> "msg": "[Errno None] Unable to connect to port 22 on 10.10.100.31"}*
>>>
>>>
>>> On Wednesday, July 8, 2020 at 9:09:33 PM UTC-4, stack flow wrote:


 Hello, I am new to ansible and its troubleshooting. my ansible script
 is failing. below is output. could you advise why is the script failing?




 *<10.10.100.59> attempting to start connection*
 *<10.10.100.59> using connection plugin network_cli*
 *<10.10.100.31> attempting to start connection*
 *<10.10.100.31> using connection plugin network_cli*
 *<10.10.100.59> local domain socket does not exist, starting it*
 *<10.10.100.59> control socket path is
 /Users/ljamm/.ansible/pc/f58522fe09*
 *<10.10.100.59> local domain socket listeners started successfully*
 *<10.10.100.31> local domain socket does not exist, starting it*
 *<10.10.100.59> loaded cliconf plugin ios from path
 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/plugins/cliconf/ios.py
 for network_os ios*
 *<10.10.100.31> control socket path is
 /Users/ljamm/.ansible/pc/91c938f5a6*
 *<10.10.100.59>*
 *<10.10.100.31> local domain socket listeners started successfully*
 *<10.10.100.59> local domain socket path is
 /Users/ljamm/.ansible/pc/f58522fe09*
 *<10.10.100.31> loaded cliconf plugin ios from path
 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ansible/plugins/cliconf/ios.py
 for network_os ios*
 *<10.10.100.31>*
 *<10.10.100.31> local domain socket path is
 /Users/ljamm/.ansible/pc/91c938f5a6*
 *[WARNING]: Ignoring timeout(10) for ios_facts*
 *[WARNING]: Ignoring timeout(10) for ios_facts*
 * Attempting python interpreter discovery*
 * Attempting python interpreter discovery*
 *<10.10.100.59> ES