SUMMARY
Hello, when starting playbook with the module routeros_facts.py for older Mikrotik devices, I get the error described below. After studying the experience of previous colleagues, I changed the response time to 2 minutes in network_cli, unfortunately this did not have the desired effect. I also tried using the prefix "+cet1024w", but it didn't work. I thought that the problem is in the old version of ROS v6. 41 <, but updating to ROS 6.45.9 did not solve the problem, and that is typical RB3011 works calmly. And on the old 951, but updated Mikrotik problems.
ISSUE TYPE
- Bug Report
ifilyanin@mikrotik-awx:~/multivendor_module_ansible$ ansible-playbook show_version_command.yml -i inventory_retn_mikrotik -vvvv -u duty+e -k -c network_cli -e ansible_network_os=routeros --check
[WARNING]: log file at /var/log/ansible.log is not writeable and we cannot create it, aborting
ansible-playbook 2.9.0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/ifilyanin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/ifilyanin/.local/lib/python3.7/site-packages/ansible
executable location = /home/ifilyanin/.local/bin/ansible-playbook
python version = 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
Using /etc/ansible/ansible.cfg as config file
SSH password:
setting up inventory plugins
host_list declined parsing /home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik as it did not pass its verify_file() method
script declined parsing /home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik as it did not pass its verify_file() method
auto declined parsing /home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik as it did not pass its verify_file() method
Not replacing invalid character(s) "{'-'}" in group name (CE-904044-2)
[DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set to
allow bad characters in group names by default, this will change, but still be
user configurable on deprecation. This feature will be removed in version 2.10.
Deprecation warnings can be disabled by setting deprecation_warnings=False in
ansible.cfg.
[WARNING]: Invalid characters were found in group names but not replaced, use
-vvvv to see details
Not replacing invalid character(s) "{'-'}" in group name (CE-904044-2)
toml declined parsing /home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik as it did not pass its verify_file() method
[WARNING]: * Failed to parse
/home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik with yaml
plugin: Syntax Error while loading YAML. did not find expected The error appears to be in
'/home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik': line 2,
column 1, but may be elsewhere in the file depending on the exact syntax
problem. The offending line appears to be: [CE-904044-2] 172.21.250.26 ^ here
File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/inventory/manager.py", line 280, in parse_source
plugin.parse(self._inventory, self._loader, source, cache=cache)
File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/inventory/yaml.py", line 105, in parse
raise AnsibleParserError(e)
[WARNING]: * Failed to parse
/home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik with ini
plugin: /home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik:3:
Expected key=value host variable assignment, got: routeros
File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/inventory/manager.py", line 280, in parse_source
plugin.parse(self._inventory, self._loader, source, cache=cache)
File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/inventory/ini.py", line 138, in parse
raise AnsibleParserError(e)
[WARNING]: Unable to parse
/home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik as an
inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
Loading callback plugin default of type stdout, v2.0 from /home/ifilyanin/.local /lib/python3.7/site-packages/ansible/plugins/callback/default.py
PLAYBOOK: show_version_command.yml *********************************************
Positional arguments: show_version_command.yml
verbosity: 4
ask_pass: True
remote_user: duty+e
connection: network_cli
timeout: 10
become_method: sudo
tags: ('all',)
check: True
inventory: ('/home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik' ,)
extra_vars: ('ansible_network_os=routeros',)
forks: 5
1 plays in show_version_command.yml
PLAY [show facts] **************************************************************
META: ran handlers
TASK [show facts] **************************************************************
task path: /home/ifilyanin/multivendor_module_ansible/show_version_command.yml:8
<172.21.250.26> attempting to start connection
<172.21.250.26> using connection plugin network_cli
<172.21.250.26> local domain socket does not exist, starting it
<172.21.250.26> control socket path is /home/ifilyanin/.ansible/pc/a591f9c842
<172.21.250.26> local domain socket listeners started successfully
<172.21.250.26> loaded cliconf plugin for network_os routeros
<172.21.250.26>
<172.21.250.26> local domain socket path is /home/ifilyanin/.ansible/pc/a591f9c8 42
<172.21.250.26> ESTABLISH LOCAL CONNECTION FOR USER: ifilyanin
<172.21.250.26> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /home/ifilyanin/ .ansible/tmp/ansible-local-201222_rdlrhxs/ansible-tmp-1597735993.0080414-1844593 85328040
" && echo ansible-tmp-1597735993.0080414-184459385328040="echo /home /ifilyanin/.ansible/tmp/ansible-local-201222_rdlrhxs/ansible-tmp-1597735993.0080 414-184459385328040
" ) && sleep 0'
<172.21.250.26> Attempting python interpreter discovery
<172.21.250.26> 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'"'"'; comm and -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0'
<172.21.250.26> EXEC /bin/sh -c '/usr/bin/python && sleep 0'
<172.21.250.26> Python interpreter discovery fallback (unsupported Linux distrib ution: debian)
Using module file /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/mod ules/network/routeros/routeros_command.py
<172.21.250.26> PUT /home/ifilyanin/.ansible/tmp/ansible-local-201222_rdlrhxs/tm p1kwdc7f1 TO /home/ifilyanin/.ansible/tmp/ansible-local-201222_rdlrhxs/ansible-t mp-1597735993.0080414-184459385328040/AnsiballZ_routeros_command.py
<172.21.250.26> EXEC /bin/sh -c 'chmod u+x /home/ifilyanin/.ansible/tmp/ansible- local-201222_rdlrhxs/ansible-tmp-1597735993.0080414-184459385328040/ /home/ifily anin/.ansible/tmp/ansible-local-201222_rdlrhxs/ansible-tmp-1597735993.0080414-18 4459385328040/AnsiballZ_routeros_command.py && sleep 0'
<172.21.250.26> EXEC /bin/sh -c '/usr/bin/python /home/ifilyanin/.ansible/tmp/an sible-local-201222_rdlrhxs/ansible-tmp-1597735993.0080414-184459385328040/Ansiba llZ_routeros_command.py && sleep 0'
<172.21.250.26> EXEC /bin/sh -c 'rm -f -r /home/ifilyanin/.ansible/tmp/ansible-l ocal-201222_rdlrhxs/ansible-tmp-1597735993.0080414-184459385328040/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/home/ifilyanin/.ansible/tmp/ansible-local-201222_rdlrhxs/ansible-tmp-15 97735993.0080414-184459385328040/AnsiballZ_routeros_command.py", line 102, in
_ansiballz_main()
File "/home/ifilyanin/.ansible/tmp/ansible-local-201222_rdlrhxs/ansible-tmp-15 97735993.0080414-184459385328040/AnsiballZ_routeros_command.py", line 94, in _an siballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/ifilyanin/.ansible/tmp/ansible-local-201222_rdlrhxs/ansible-tmp-15 97735993.0080414-184459385328040/AnsiballZ_routeros_command.py", line 40, in inv oke_module
runpy.run_module(mod_name='ansible.modules.network.routeros.routeros_command ', init_globals=None, run_name='main', alter_sys=False)
File "/usr/lib/python2.7/runpy.py", line 192, in run_module
fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/tmp/ansible_routeros_command_payload__HFS1L/ansible_routeros_command_pa yload.zip/ansible/modules/network/routeros/routeros_command.py", line 187, in
File "/tmp/ansible_routeros_command_payload__HFS1L/ansible_routeros_command_pa yload.zip/ansible/modules/network/routeros/routeros_command.py", line 157, in ma in
File "/tmp/ansible_routeros_command_payload__HFS1L/ansible_routeros_command_pa yload.zip/ansible/module_utils/network/routeros/routeros.py", line 125, in run_c ommands
File "/tmp/ansible_routeros_command_payload__HFS1L/ansible_routeros_command_pa yload.zip/ansible/module_utils/network/routeros/routeros.py", line 55, in get_co nnection
File "/tmp/ansible_routeros_command_payload__HFS1L/ansible_routeros_command_pa yload.zip/ansible/module_utils/network/routeros/routeros.py", line 69, in get_ca pabilities
File "/tmp/ansible_routeros_command_payload__HFS1L/ansible_routeros_command_pa yload.zip/ansible/module_utils/connection.py", line 185, in rpc
ansible.module_utils.connection.ConnectionError: timeout value 30 seconds reache d while trying to send command: b'/system resource print'
[WARNING]: Platform linux on host 172.21.250.26 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/referen
ce_appendices/interpreter_discovery.html for more information.
fatal: [172.21.250.26]: FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File "/home/ifilyan in/.ansible/tmp/ansible-local-201222_rdlrhxs/ansible-tmp-1597735993.0080414-1844 59385328040/AnsiballZ_routeros_command.py", line 102, in \n _ansibal lz_main()\n File "/home/ifilyanin/.ansible/tmp/ansible-local-201222_rdlrhxs/an sible-tmp-1597735993.0080414-184459385328040/AnsiballZ_routeros_command.py", li ne 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PA RAMS)\n File "/home/ifilyanin/.ansible/tmp/ansible-local-201222_rdlrhxs/ansibl e-tmp-1597735993.0080414-184459385328040/AnsiballZ_routeros_command.py", line 4 0, in invoke_module\n runpy.run_module(mod_name='ansible.modules.network.rout eros.routeros_command', init_globals=None, run_name='main', alter_sys=False) \n File "/usr/lib/python2.7/runpy.py", line 192, in run_module\n fname, lo ader, pkg_name)\n File "/usr/lib/python2.7/runpy.py", line 72, in _run_code\n exec code in run_globals\n File "/tmp/ansible_routeros_command_payload__HF S1L/ansible_routeros_command_payload.zip/ansible/modules/network/routeros/router os_command.py", line 187, in \n File "/tmp/ansible_routeros_command_p ayload__HFS1L/ansible_routeros_command_payload.zip/ansible/modules/network/route ros/routeros_command.py", line 157, in main\n File "/tmp/ansible_routeros_com mand_payload__HFS1L/ansible_routeros_command_payload.zip/ansible/module_utils/ne twork/routeros/routeros.py", line 125, in run_commands\n File "/tmp/ansible_r outeros_command_payload__HFS1L/ansible_routeros_command_payload.zip/ansible/modu le_utils/network/routeros/routeros.py", line 55, in get_connection\n File "/t mp/ansible_routeros_command_payload__HFS1L/ansible_routeros_command_payload.zip/ ansible/module_utils/network/routeros/routeros.py", line 69, in get_capabilitie s\n File "/tmp/ansible_routeros_command_payload__HFS1L/ansible_routeros_comman d_payload.zip/ansible/module_utils/connection.py", line 185, in rpc\nansibl e.module_utils.connection.ConnectionError: timeout value 30 seconds reached whil e trying to send command: b'/system resource print'\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
...ignoring
META: ran handlers
META: ran handlers
PLAY RECAP *********************************************************************
172.21.250.26 : ok=1 changed=0 unreachable=0 failed=0 s kipped=0 rescued=0 ignored=1
2020-08-16 15:17:16,553 p=ifilyanin u=156254 | ansible-playbook 2.9.0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/ifilyanin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/ifilyanin/.local/lib/python3.7/site-packages/ansible
executable location = /home/ifilyanin/.local/bin/ansible-playbook
python version = 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
2020-08-16 15:17:16,553 p=ifilyanin u=156254 | Using /etc/ansible/ansible.cfg as config file
2020-08-16 15:17:21,583 p=ifilyanin u=156254 | setting up inventory plugins
2020-08-16 15:17:21,592 p=ifilyanin u=156254 | host_list declined parsing /home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik as it did not pass its verify_file() method
2020-08-16 15:17:21,592 p=ifilyanin u=156254 | script declined parsing /home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik as it did not pass its verify_file() method
2020-08-16 15:17:21,592 p=ifilyanin u=156254 | auto declined parsing /home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik as it did not pass its verify_file() method
2020-08-16 15:17:21,598 p=ifilyanin u=156254 | Not replacing invalid character(s) "{'-'}" in group name (CE-904044-2)
2020-08-16 15:17:21,598 p=ifilyanin u=156254 | [DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set to allow bad characters in group names by default, this will change, but still be user configurable on
deprecation. This feature will be removed in version 2.10. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
2020-08-16 15:17:21,598 p=ifilyanin u=156254 | [WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
2020-08-16 15:17:21,599 p=ifilyanin u=156254 | Not replacing invalid character(s) "{'-'}" in group name (CE-904044-2)
2020-08-16 15:17:21,600 p=ifilyanin u=156254 | toml declined parsing /home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik as it did not pass its verify_file() method
2020-08-16 15:17:21,601 p=ifilyanin u=156254 | [WARNING]: * Failed to parse /home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik with yaml plugin: Syntax Error while loading YAML. did not find expected
The error appears to be in '/home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik': line 2, column 1, but may be elsewhere in the file depending
on the exact syntax problem. The offending line appears to be: [CE-904044-2] 172.21.250.26 ^ here
2020-08-16 15:17:21,601 p=ifilyanin u=156254 | File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/inventory/manager.py", line 280, in parse_source
plugin.parse(self._inventory, self._loader, source, cache=cache)
File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/inventory/yaml.py", line 105, in parse
raise AnsibleParserError(e)
2020-08-16 15:17:21,601 p=ifilyanin u=156254 | [WARNING]: * Failed to parse /home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik with ini plugin:
/home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik:3: Expected key=value host variable assignment, got: routeros
2020-08-16 15:17:21,601 p=ifilyanin u=156254 | File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/inventory/manager.py", line 280, in parse_source
plugin.parse(self._inventory, self._loader, source, cache=cache)
File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/inventory/ini.py", line 138, in parse
raise AnsibleParserError(e)
2020-08-16 15:17:21,602 p=ifilyanin u=156254 | [WARNING]: Unable to parse /home/ifilyanin/multivendor_module_ansible/inventory_retn_mikrotik as an inventory source
2020-08-16 15:17:21,602 p=ifilyanin u=156254 | [WARNING]: No inventory was parsed, only implicit localhost is available
2020-08-16 15:17:21,602 p=ifilyanin u=156254 | [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
2020-08-16 15:17:21,865 p=ifilyanin u=156254 | Loading callback plugin default of type stdout, v2.0 from /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/callback/default.py
2020-08-16 15:17:21,926 p=ifilyanin u=156254 | PLAYBOOK: show_version_command.yml **********************************************************************************************************************************************
2020-08-16 15:17:21,927 p=ifilyanin u=156254 | 1 plays in show_version_command.yml
2020-08-16 15:17:21,931 p=ifilyanin u=156254 | PLAY [show facts] ***************************************************************************************************************************************************************
2020-08-16 15:17:21,943 p=ifilyanin u=156254 | META: ran handlers
2020-08-16 15:17:21,953 p=ifilyanin u=156254 | TASK [show facts] ***************************************************************************************************************************************************************
2020-08-16 15:17:21,972 p=ifilyanin u=156260 | <172.21.250.26> attempting to start connection
2020-08-16 15:17:21,973 p=ifilyanin u=156260 | <172.21.250.26> using connection plugin network_cli
2020-08-16 15:17:22,359 p=ifilyanin u=156260 | <172.21.250.26> local domain socket does not exist, starting it
2020-08-16 15:17:22,360 p=ifilyanin u=156260 | <172.21.250.26> control socket path is /home/ifilyanin/.ansible/pc/9697c92b53
2020-08-16 15:17:22,360 p=ifilyanin u=156260 | <172.21.250.26> 156261 1597580242.27891: trying /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection/pycache
2020-08-16 15:17:22,360 p=ifilyanin u=156260 | <172.21.250.26> 156261 1597580242.27920: trying /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection
2020-08-16 15:17:22,360 p=ifilyanin u=156260 | <172.21.250.26> 156261 1597580242.28906: Loaded config def from plugin (connection/ssh)
2020-08-16 15:17:22,360 p=ifilyanin u=156260 | <172.21.250.26> 156261 1597580242.28913: Loading Connection 'ssh' from /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection/ssh.py (searched paths: /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection:/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection/pycache) (found_in_cache=False, class_only=True)
2020-08-16 15:17:22,360 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.30196: Loaded config def from plugin (connection/network_cli)
2020-08-16 15:17:22,361 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.30214: Loading Connection 'network_cli' from /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection/network_cli.py (searched paths: /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection:/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection/pycache)
2020-08-16 15:17:22,361 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.30266: trying /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/shell
2020-08-16 15:17:22,361 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.30404: trying /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/doc_fragments
2020-08-16 15:17:22,361 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.30580: Loading ModuleDocFragment 'shell_common' from /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/doc_fragments/shell_common.py
2020-08-16 15:17:22,361 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.30685: Loaded config def from plugin (shell/sh)
2020-08-16 15:17:22,361 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.30691: Loading ShellModule 'sh' from /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/shell/sh.py
2020-08-16 15:17:22,361 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.30697: Loading ShellModule 'sh' from /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2020-08-16 15:17:22,361 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.30752: Loading Connection 'local' from /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection/local.py (searched paths: /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection:/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection/pycache)
2020-08-16 15:17:22,361 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.30767: Loading ShellModule 'sh' from /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2020-08-16 15:17:22,362 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.30771: Loading ShellModule 'sh' from /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2020-08-16 15:17:22,362 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.30787: Loading Connection 'ssh' from /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection/ssh.py (searched paths: /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection:/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection/pycache) (found_in_cache=True, class_only=True)
2020-08-16 15:17:22,362 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.31028: trying /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/terminal/pycache
2020-08-16 15:17:22,362 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.31062: trying /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/terminal
2020-08-16 15:17:22,362 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.31219: Loading TerminalModule 'routeros' from /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/terminal/routeros.py (searched paths: /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/terminal:/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/terminal/pycache)
2020-08-16 15:17:22,362 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.31412: trying /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/cliconf/pycache
2020-08-16 15:17:22,362 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.31444: trying /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/cliconf
2020-08-16 15:17:22,362 p=ifilyanin u=156260 | <172.21.250.26> 156265 1597580242.31523: Loading Cliconf 'routeros' from /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/cliconf/routeros.py (searched paths: /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/cliconf:/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/cliconf/pycache)
2020-08-16 15:17:22,362 p=ifilyanin u=156260 | <172.21.250.26> local domain socket listeners started successfully
2020-08-16 15:17:22,363 p=ifilyanin u=156260 | <172.21.250.26> loaded cliconf plugin for network_os routeros
2020-08-16 15:17:22,363 p=ifilyanin u=156260 | network_os is set to routeros
2020-08-16 15:17:22,363 p=ifilyanin u=156260 | <172.21.250.26> 156261 1597580242.27891: trying /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection/pycache
156261 1597580242.27920: trying /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection
156261 1597580242.28906: Loaded config def from plugin (connection/ssh)
156261 1597580242.28913: Loading Connection 'ssh' from /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection/ssh.py (searched paths: /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection:/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection/pycache) (found_in_cache=False, class_only=True)
2020-08-16 15:17:22,363 p=ifilyanin u=156260 | <172.21.250.26> local domain socket path is /home/ifilyanin/.ansible/pc/9697c92b53
2020-08-16 15:17:22,365 p=ifilyanin u=156260 | <172.21.250.26> ESTABLISH LOCAL CONNECTION FOR USER: ifilyanin
2020-08-16 15:17:22,366 p=ifilyanin u=156260 | <172.21.250.26> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /home/ifilyanin/.ansible/tmp/ansible-local-156254na3tocp4/ansible-tmp-1597580242.3654187-206418296162592
" && echo ansible-tmp-1597580242.3654187-206418296162592="echo /home/ifilyanin/.ansible/tmp/ansible-local-156254na3tocp4/ansible-tmp-1597580242.3654187-206418296162592
" ) && sleep 0'
2020-08-16 15:17:22,545 p=ifilyanin u=156260 | <172.21.250.26> Attempting python interpreter discovery
2020-08-16 15:17:22,546 p=ifilyanin u=156260 | <172.21.250.26> 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'
2020-08-16 15:17:22,556 p=ifilyanin u=156260 | <172.21.250.26> EXEC /bin/sh -c '/usr/bin/python && sleep 0'
2020-08-16 15:17:22,579 p=ifilyanin u=156260 | <172.21.250.26> Python interpreter discovery fallback (unsupported Linux distribution: debian)
2020-08-16 15:17:22,581 p=ifilyanin u=156260 | Using module file /home/ifilyanin/.local/lib/python3.7/site-packages/ansible/modules/network/routeros/routeros_command.py
2020-08-16 15:17:22,582 p=ifilyanin u=156260 | <172.21.250.26> PUT /home/ifilyanin/.ansible/tmp/ansible-local-156254na3tocp4/tmpdjarrryp TO /home/ifilyanin/.ansible/tmp/ansible-local-156254na3tocp4/ansible-tmp-1597580242.3654187-206418296162592/AnsiballZ_routeros_command.py
2020-08-16 15:17:22,583 p=ifilyanin u=156260 | <172.21.250.26> EXEC /bin/sh -c 'chmod u+x /home/ifilyanin/.ansible/tmp/ansible-local-156254na3tocp4/ansible-tmp-1597580242.3654187-206418296162592/ /home/ifilyanin/.ansible/tmp/ansible-local-156254na3tocp4/ansible-tmp-1597580242.3654187-206418296162592/AnsiballZ_routeros_command.py && sleep 0'
2020-08-16 15:17:22,589 p=ifilyanin u=156260 | <172.21.250.26> EXEC /bin/sh -c '/usr/bin/python /home/ifilyanin/.ansible/tmp/ansible-local-156254na3tocp4/ansible-tmp-1597580242.3654187-206418296162592/AnsiballZ_routeros_command.py && sleep 0'
2020-08-16 15:17:22,709 p=ifilyanin u=156265 | <172.21.250.26> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: duty+e on PORT 22 TO 172.21.250.26
2020-08-16 15:18:03,503 p=ifilyanin u=156265 | Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/paramiko/channel.py", line 699, in recv
out = self.in_buffer.read(nbytes, self.timeout)
File "/usr/lib/python3/dist-packages/paramiko/buffered_pipe.py", line 164, in read
raise PipeTimeout()
paramiko.buffered_pipe.PipeTimeout
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection/network_cli.py", line 579, in send
response = self.receive(command, prompt, answer, newline, prompt_retry_check, check_all)
File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection/network_cli.py", line 528, in receive
data = self._ssh_shell.recv(256)
File "/usr/lib/python3/dist-packages/paramiko/channel.py", line 701, in recv
raise socket.timeout()
socket.timeout
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/utils/jsonrpc.py", line 45, in handle_request
result = rpc_method(*args, **kwargs)
File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/cliconf/routeros.py", line 78, in get_capabilities
result = super(Cliconf, self).get_capabilities()
File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/cliconf/init.py", line 283, in get_capabilities
result['device_info'] = self.get_device_info()
File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/cliconf/routeros.py", line 48, in get_device_info
resource = self.get('/system resource print')
File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/cliconf/routeros.py", line 75, in get
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/cliconf/init.py", line 127, in send_command
resp = self._connection.send(**kwargs)
File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection/init.py", line 35, in wrapped
return func(self, *args, **kwargs)
File "/home/ifilyanin/.local/lib/python3.7/site-packages/ansible/plugins/connection/network_cli.py", line 584, in send
% (self._ssh_shell.gettimeout(), command.strip()))
ansible.errors.AnsibleConnectionFailure: timeout value 30 seconds reached while trying to send command: b'/system resource print'
2020-08-16 15:18:03,517 p=ifilyanin u=156260 | <172.21.250.26> EXEC /bin/sh -c 'rm -f -r /home/ifilyanin/.ansible/tmp/ansible-local-156254na3tocp4/ansible-tmp-1597580242.3654187-206418296162592/ > /dev/null 2>&1 && sleep 0'
2020-08-16 15:18:03,527 p=ifilyanin u=156254 | The full traceback is:
Traceback (most recent call last):
File "/home/ifilyanin/.ansible/tmp/ansible-local-156254na3tocp4/ansible-tmp-1597580242.3654187-206418296162592/AnsiballZ_routeros_command.py", line 102, in
_ansiballz_main()
File "/home/ifilyanin/.ansible/tmp/ansible-local-156254na3tocp4/ansible-tmp-1597580242.3654187-206418296162592/AnsiballZ_routeros_command.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/ifilyanin/.ansible/tmp/ansible-local-156254na3tocp4/ansible-tmp-1597580242.3654187-206418296162592/AnsiballZ_routeros_command.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.network.routeros.routeros_command', init_globals=None, run_name='main', alter_sys=False)
File "/usr/lib/python2.7/runpy.py", line 192, in run_module
fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/tmp/ansible_routeros_command_payload_35_ouf/ansible_routeros_command_payload.zip/ansible/modules/network/routeros/routeros_command.py", line 187, in
File "/tmp/ansible_routeros_command_payload_35_ouf/ansible_routeros_command_payload.zip/ansible/modules/network/routeros/routeros_command.py", line 157, in main
File "/tmp/ansible_routeros_command_payload_35_ouf/ansible_routeros_command_payload.zip/ansible/module_utils/network/routeros/routeros.py", line 125, in run_commands
File "/tmp/ansible_routeros_command_payload_35_ouf/ansible_routeros_command_payload.zip/ansible/module_utils/network/routeros/routeros.py", line 55, in get_connection
File "/tmp/ansible_routeros_command_payload_35_ouf/ansible_routeros_command_payload.zip/ansible/module_utils/network/routeros/routeros.py", line 69, in get_capabilities
File "/tmp/ansible_routeros_command_payload_35_ouf/ansible_routeros_command_payload.zip/ansible/module_utils/connection.py", line 185, in rpc
ansible.module_utils.connection.ConnectionError: timeout value 30 seconds reached while trying to send command: b'/system resource print'
2020-08-16 15:18:03,528 p=ifilyanin u=156254 | [WARNING]: Platform linux on host 172.21.250.26 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.
2020-08-16 15:18:03,528 p=ifilyanin u=156254 | fatal: [172.21.250.26]: FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File "/home/ifilyanin/.ansible/tmp/ansible-local-156254na3tocp4/ansible-tmp-1597580242.3654187-206418296162592/AnsiballZ_routeros_command.py", line 102, in \n _ansiballz_main()\n File "/home/ifilyanin/.ansible/tmp/ansible-local-156254na3tocp4/ansible-tmp-1597580242.3654187-206418296162592/AnsiballZ_routeros_command.py", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/ifilyanin/.ansible/tmp/ansible-local-156254na3tocp4/ansible-tmp-1597580242.3654187-206418296162592/AnsiballZ_routeros_command.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.network.routeros.routeros_command', init_globals=None, run_name='main', alter_sys=False)\n File "/usr/lib/python2.7/runpy.py", line 192, in run_module\n fname, loader, pkg_name)\n File "/usr/lib/python2.7/runpy.py", line 72, in _run_code\n exec code in run_globals\n File "/tmp/ansible_routeros_command_payload_35_ouf/ansible_routeros_command_payload.zip/ansible/modules/network/routeros/routeros_command.py", line 187, in \n File "/tmp/ansible_routeros_command_payload_35_ouf/ansible_routeros_command_payload.zip/ansible/modules/network/routeros/routeros_command.py", line 157, in main\n File "/tmp/ansible_routeros_command_payload_35_ouf/ansible_routeros_command_payload.zip/ansible/module_utils/network/routeros/routeros.py", line 125, in run_commands\n File "/tmp/ansible_routeros_command_payload_35_ouf/ansible_routeros_command_payload.zip/ansible/module_utils/network/routeros/routeros.py", line 55, in get_connection\n File "/tmp/ansible_routeros_command_payload_35_ouf/ansible_routeros_command_payload.zip/ansible/module_utils/network/routeros/routeros.py", line 69, in get_capabilities\n File "/tmp/ansible_routeros_command_payload_35_ouf/ansible_routeros_command_payload.zip/ansible/module_utils/connection.py", line 185, in rpc\nansible.module_utils.connection.ConnectionError: timeout value 30 seconds reached while trying to send command: b'/system resource print'\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
2020-08-16 15:18:03,528 p=ifilyanin u=156254 | ...ignoring
2020-08-16 15:18:03,530 p=ifilyanin u=156254 | META: ran handlers
2020-08-16 15:18:03,531 p=ifilyanin u=156254 | META: ran handlers
2020-08-16 15:18:03,534 p=ifilyanin u=156254 | PLAY RECAP **********************************************************************************************************************************************************************
2020-08-16 15:18:03,534 p=ifilyanin u=156254 | 172.21.250.26 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=1
2020-08-16 15:18:03,634 p=ifilyanin u=156265 | shutdown complete
COMPONENT NAME
routeros_facts.py, routeros_command.py
ANSIBLE VERSION
ansible --version
[WARNING]: log file at /var/log/ansible.log is not writeable and we cannot create it, aborting
ansible 2.9.0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/ifilyanin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/ifilyanin/.local/lib/python3.7/site-packages/ansible
executable location = /home/ifilyanin/.local/bin/ansible
python version = 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
CONFIGURATION
ansible-config dump --only-changed
[WARNING]: log file at /var/log/ansible.log is not writeable and we cannot create it, aborting
DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible.log
OS / ENVIRONMENT
Debian 10
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
- name: show facts
hosts: "{{ hosts }}"
gather_facts: false
ignore_errors: true
tasks:
- name: show facts
routeros_facts:
gather_subset: "{{ gather_facts }}"
- name: show facts
hosts: CE-904044-2
gather_facts: false
ignore_errors: true
tasks:
- name: show facts
routeros_command:
commands: /export