Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

juniper.device 1.0.7 - NameError: name 'LooseVersion' is not defined #710

Open
jnicholson56 opened this issue Dec 20, 2024 · 1 comment
Open

Comments

@jnicholson56
Copy link

Issue Type

  • Bug Report

Module Name

juniper.device

juniper.device collection and Python libraries version

ansible --version
[WARNING]: log file at /tftpboot/dumps/ansible_logs/logs/ansible.log is not writeable and we cannot create it, aborting

ansible [core 2.15.6]
  config file = /home/josephn/ansible.cfg
  configured module search path = ['/home/josephn/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
  ansible collection location = /home/josephn/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.12 (main, Nov  6 2024, 20:22:13) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True

juniper.device                1.0.7

pip freeze
alembic==1.11.3
ansible==8.6.1
ansible-base==2.10.8
ansible-core==2.15.6
ansible-pylibssh==1.1.0
ansible-runner==2.3.4
anyio==3.7.1
apache-libcloud==3.2.0
argcomplete==1.8.1
async-timeout==4.0.3
asyncio-redis==0.16.0
asyncstdlib==3.10.9
attrs==21.2.0
Authlib==1.0.1
Automat==20.2.0
Babel==2.8.0
bcrypt==3.2.0
black==24.8.0
blinker==1.4
broadcaster==0.2.0
certifi==2020.6.20
cffi==1.17.1
chardet==4.0.0
click==8.0.3
cloud-init==24.3.1
colorama==0.4.4
configobj==5.0.6
constantly==15.1.0
cryptography==3.4.8
dbus-python==1.2.18
deepmerge==0.1.0
Deprecated==1.2.14
distro==1.7.0
distro-info==1.1+ubuntu0.2
dnspython==2.4.2
docker==5.0.3
docker-compose==1.29.2
dockerpty==0.4.1
docopt==0.6.2
docutils==0.20.1
email-validator==2.1.0.post1
exceptiongroup==1.1.3
fail2ban==0.11.2
fastapi==0.99.1
fastapi-etag==0.4.0
graphql-core==3.2.3
greenlet==3.0.1
h11==0.12.0
h2==4.1.0
hpack==4.0.0
httpcore==0.15.0
httplib2==0.20.2
httptools==0.6.1
httpx==0.23.0
hyperframe==6.0.1
hyperlink==21.0.0
idna==3.3
importlib-metadata==4.6.4
incremental==21.3.0
itsdangerous==2.1.2
jeepney==0.7.1
Jinja2==3.1.2
jmespath==0.10.0
jsonpatch==1.32
jsonpointer==2.0
jsonschema==3.2.0
junos-eznc==2.7.2
jxmlease==1.0.3
keyring==23.5.0
launchpadlib==1.10.16
lazr.restfulclient==0.14.4
lazr.uri==1.0.6
lockfile==0.12.2
lxml==5.3.0
Mako==1.3.0
MarkupSafe==2.0.1
more-itertools==9.0.0
mypy-extensions==1.0.0
ncclient==0.6.15
netaddr==0.8.0
netifaces==0.11.0
ntlm-auth==1.4.0
nwa-stdlib==1.4.10
oauth2-lib==1.4.1
oauthlib==3.2.0
orchestrator-core==1.3.4
orjson==3.9.5
packaging==24.1
paramiko==3.5.0
pathspec==0.9.0
pexpect==4.8.0
platformdirs==4.3.6
psutil==6.1.0
psycopg2-binary==2.9.5
ptyprocess==0.7.0
pyasn1==0.4.8
pyasn1-modules==0.2.1
pycparser==2.22
pycryptodomex==3.11.0
pydantic==1.10.9
pydantic-forms==0.2.0
PyGObject==3.42.1
PyHamcrest==2.0.2
pyinotify==0.9.6
PyJWT==2.3.0
pykerberos==1.1.14
PyNaCl==1.5.0
pyOpenSSL==21.0.0
pyparsing==2.4.7
pyrsistent==0.18.1
pyserial==3.5
python-apt==2.4.0+ubuntu4
python-daemon==3.0.1
python-dateutil==2.8.2
python-debian==0.1.43+ubuntu1.1
python-dotenv==1.0.0
python-magic==0.4.24
python-rapidjson==1.9
pytz==2023.3
pywinrm==0.3.0
PyYAML==5.4.1
redis==4.6.0
requests==2.25.1
requests-kerberos==0.12.0
requests-ntlm==1.1.0
requests-toolbelt==0.9.1
resolvelib==1.0.1
rfc3986==1.5.0
schedule==1.1.0
scp==0.15.0
SecretStorage==3.3.1
selinux==3.3
sentry-sdk==1.30.0
service-identity==18.1.0
simplejson==3.17.6
six==1.16.0
sniffio==1.3.0
sos==4.5.6
SQLAlchemy==2.0.20
SQLAlchemy-Utils==0.41.1
ssh-import-id==5.11
starlette==0.27.0
strawberry-graphql==0.203.3
structlog==22.1.0
systemd-python==234
tabulate==0.9.0
texttable==1.6.4
tomli==2.0.1
transitions==0.9.2
Twisted==22.1.0
typer==0.7.0
typing_extensions==4.8.0
ubuntu-drivers-common==0.0.0
ubuntu-pro-client==8001
ufw==0.36.1
unattended-upgrades==0.1
urllib3==2.1.0
uvicorn==0.20.0
uvloop==0.19.0
wadllib==1.3.6
watchfiles==0.21.0
websocket-client==1.2.3
websockets==12.0
wrapt==1.16.0
xkit==0.0.0
xmltodict==0.12.0
yamllint==1.26.3
yamlordereddictloader==0.4.2
zipp==1.0.0
zope.interface==5.4.0

OS / Environment

Ubuntu 22.04

Summary

I get the following error when trying to run a command using juniper.device.command using juniper.device version 1.0.7

The full traceback is:
Traceback (most recent call last):
  File "/home/josephn/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/AnsiballZ_command.py", line 107, in <module>
    _ansiballz_main()
  File "/home/josephn/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/AnsiballZ_command.py", line 99, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/josephn/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/AnsiballZ_command.py", line 47, in invoke_module
    runpy.run_module(mod_name='ansible_collections.juniper.device.plugins.modules.command', init_globals=dict(_module_fqn='ansible_collections.juniper.device.plugins.modules.command', _modlib_path=modlib_path),
  File "/usr/lib/python3.10/runpy.py", line 224, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib/python3.10/runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/modules/command.py", line 504, in <module>
  File "/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/modules/command.py", line 300, in main
  File "/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/module_utils/juniper_junos_common.py", line 659, in __init__
  File "/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/module_utils/configuration.py", line 291, in check_sw_compatibility
  File "/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/module_utils/configuration.py", line 200, in check_pyez
  File "/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/module_utils/configuration.py", line 168, in _check_library
NameError: name 'LooseVersion' is not defined
fatal: [a01.testtx03.us.bb]: FAILED! => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/home/josephn/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/AnsiballZ_command.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/home/josephn/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/AnsiballZ_command.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/josephn/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/AnsiballZ_command.py\", line 47, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.juniper.device.plugins.modules.command', init_globals=dict(_module_fqn='ansible_collections.juniper.device.plugins.modules.command', _modlib_path=modlib_path),\n  File \"/usr/lib/python3.10/runpy.py\", line 224, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib/python3.10/runpy.py\", line 96, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib/python3.10/runpy.py\", line 86, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/modules/command.py\", line 504, in <module>\n  File \"/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/modules/command.py\", line 300, in main\n  File \"/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/module_utils/juniper_junos_common.py\", line 659, in __init__\n  File \"/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/module_utils/configuration.py\", line 291, in check_sw_compatibility\n  File \"/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/module_utils/configuration.py\", line 200, in check_pyez\n  File \"/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/module_utils/configuration.py\", line 168, in _check_library\nNameError: name 'LooseVersion' is not defined\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}
[WARNING]: Failure using method (v2_runner_on_failed) in callback plugin (<ansible_collections.community.general.plugins.callback.log_plays.CallbackModule
object at 0x7f194eb13670>): [Errno 2] No such file or directory: '~/ansible_logs/logs/a01.testtx03.us.bb'
Callback Exception:
  File "/usr/local/lib/python3.10/dist-packages/ansible/executor/task_queue_manager.py", line 468, in send_callback
    method(*new_args, **kwargs)
   File "/usr/local/lib/python3.10/dist-packages/ansible_collections/community/general/plugins/callback/log_plays.py", line 104, in v2_runner_on_failed
    self.log(result, 'FAILED')
   File "/usr/local/lib/python3.10/dist-packages/ansible_collections/community/general/plugins/callback/log_plays.py", line 100, in log
    with open(path, "ab") as fd:

Steps to reproduce

Ran the playbook below

---
- name: AWX Test File
  hosts: all
  ignore_unreachable: true
  gather_facts: false
  vars:
    ansible_host_key_checking: false

  tasks:
    - name: Generate RSI
      juniper.device.command:
        command:
          - request support information
        dest: "{{ inventory_hostname }}_rsi.txt"
        formats: text
        return_output: false # Will not return output to Ansible (output is too large)
        huge_tree: true # Will not fail if output is too large
        timeout: 1800

Expected results

I expected the playbook to generate a file with RSI output from the router in my local directory. It works fine if I lower the version of juniper.device to 1.0.6 or 1.0.5. This broke yesterday when 1.0.7 was released. My AWX EE was setup to pull newer versions and I fixed my issues but removing that functionality.

Actual results

ansible-playbook -l router_name awx_test.yaml -vvvv
ansible-playbook [core 2.15.6]
  config file = /home/username/projects/operational-ansible-playbooks/ansible.cfg
  configured module search path = ['/home/username/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
  ansible collection location = /home/username/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible-playbook
  python version = 3.10.12 (main, Nov  6 2024, 20:22:13) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
Using /home/username/projects/operational-ansible-playbooks/ansible.cfg as config file
setting up inventory plugins
Loading collection ansible.builtin from
host_list declined parsing /home/username/projects/operational-ansible-playbooks/inventory/gums_devices as it did not pass its verify_file() method
Parsed /home/username/projects/operational-ansible-playbooks/inventory/gums_devices inventory source with script plugin
/usr/lib/python3/dist-packages/requests/__init__.py:87: RequestsDependencyWarning: urllib3 (2.1.0) or chardet (4.0.0) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Loading collection juniper.device from /usr/local/lib/python3.10/dist-packages/ansible_collections/juniper/device
Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python3.10/dist-packages/ansible/plugins/callback/default.py
Loading collection ansible.posix from /usr/local/lib/python3.10/dist-packages/ansible_collections/ansible/posix
Loading collection community.general from /usr/local/lib/python3.10/dist-packages/ansible_collections/community/general
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
Loading callback plugin ansible.posix.profile_tasks of type aggregate, v2.0 from /usr/local/lib/python3.10/dist-packages/ansible_collections/ansible/posix/plugins/callback/profile_tasks.py
Loading callback plugin ansible.posix.timer of type aggregate, v2.0 from /usr/local/lib/python3.10/dist-packages/ansible_collections/ansible/posix/plugins/callback/timer.py
Loading callback plugin community.general.log_plays of type notification, v2.0 from /usr/local/lib/python3.10/dist-packages/ansible_collections/community/general/plugins/callback/log_plays.py

PLAYBOOK: awx_test.yaml ***************************************************************************************************************************************
Positional arguments: awx_test.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/home/username/projects/operational-ansible-playbooks/inventory',)
subset: router_name
forks: 3
1 plays in awx_test.yaml
Read vars_file 'vars/shared_vars.yaml'
Read vars_file 'vars/os_revision_vars.yaml'
Read vars_file 'vars/shared_vars.yaml'
Read vars_file 'vars/os_revision_vars.yaml'
Read vars_file 'vars/shared_vars.yaml'
Read vars_file 'vars/os_revision_vars.yaml'

PLAY [Awx_test_file] ******************************************************************************************************************************************
Read vars_file 'vars/shared_vars.yaml'
Read vars_file 'vars/os_revision_vars.yaml'
Read vars_file 'vars/shared_vars.yaml'
Read vars_file 'vars/os_revision_vars.yaml'
Read vars_file 'vars/shared_vars.yaml'
Read vars_file 'vars/os_revision_vars.yaml'

TASK [Generate RSI] *******************************************************************************************************************************************
task path: /home/username/projects/operational-ansible-playbooks/awx_test.yaml:16
Friday 20 December 2024  22:23:53 +0000 (0:00:00.120)       0:00:00.120 *******
<router_name> ESTABLISH LOCAL CONNECTION FOR USER: username
<router_name> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/tmp/.ansible `"&& mkdir "` echo $HOME/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705 `" && echo ansible-tmp-1734733433.9948735-1257834-271372075631705="` echo $HOME/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705 `" ) && sleep 0'
<router_name> Attempting python interpreter discovery
<router_name> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'python3.11'"'"'; command -v '"'"'python3.10'"'"'; command -v '"'"'python3.9'"'"'; command -v '"'"'python3.8'"'"'; command -v '"'"'python3.7'"'"'; command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'python2.7'"'"'; command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0'
<router_name> EXEC /bin/sh -c '/usr/bin/python3.11 && sleep 0'
Using module file /usr/local/lib/python3.10/dist-packages/ansible_collections/juniper/device/plugins/modules/command.py
<router_name> PUT /home/username/.ansible/tmp/ansible-local-1257822x88qkl_4/tmpzxcfm6ul TO /home/username/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/AnsiballZ_command.py
<router_name> EXEC /bin/sh -c 'chmod u+x /home/username/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/ /home/username/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/AnsiballZ_command.py && sleep 0'
<router_name> EXEC /bin/sh -c '/usr/bin/python3 /home/username/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/AnsiballZ_command.py && sleep 0'
<router_name> EXEC /bin/sh -c 'rm -f -r /home/username/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
  File "/home/username/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/AnsiballZ_command.py", line 107, in <module>
    _ansiballz_main()
  File "/home/username/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/AnsiballZ_command.py", line 99, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/username/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/AnsiballZ_command.py", line 47, in invoke_module
    runpy.run_module(mod_name='ansible_collections.juniper.device.plugins.modules.command', init_globals=dict(_module_fqn='ansible_collections.juniper.device.plugins.modules.command', _modlib_path=modlib_path),
  File "/usr/lib/python3.10/runpy.py", line 224, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib/python3.10/runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/modules/command.py", line 504, in <module>
  File "/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/modules/command.py", line 300, in main
  File "/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/module_utils/juniper_junos_common.py", line 659, in __init__
  File "/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/module_utils/configuration.py", line 291, in check_sw_compatibility
  File "/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/module_utils/configuration.py", line 200, in check_pyez
  File "/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/module_utils/configuration.py", line 168, in _check_library
NameError: name 'LooseVersion' is not defined
fatal: [router_name]: FAILED! => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/home/username/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/AnsiballZ_command.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/home/username/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/AnsiballZ_command.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/username/tmp/.ansible/ansible-tmp-1734733433.9948735-1257834-271372075631705/AnsiballZ_command.py\", line 47, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.juniper.device.plugins.modules.command', init_globals=dict(_module_fqn='ansible_collections.juniper.device.plugins.modules.command', _modlib_path=modlib_path),\n  File \"/usr/lib/python3.10/runpy.py\", line 224, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib/python3.10/runpy.py\", line 96, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib/python3.10/runpy.py\", line 86, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/modules/command.py\", line 504, in <module>\n  File \"/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/modules/command.py\", line 300, in main\n  File \"/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/module_utils/juniper_junos_common.py\", line 659, in __init__\n  File \"/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/module_utils/configuration.py\", line 291, in check_sw_compatibility\n  File \"/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/module_utils/configuration.py\", line 200, in check_pyez\n  File \"/tmp/ansible_juniper.device.command_payload_gx_z54jo/ansible_juniper.device.command_payload.zip/ansible_collections/juniper/device/plugins/module_utils/configuration.py\", line 168, in _check_library\nNameError: name 'LooseVersion' is not defined\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}
[WARNING]: Failure using method (v2_runner_on_failed) in callback plugin (<ansible_collections.community.general.plugins.callback.log_plays.CallbackModule
object at 0x7f194eb13670>): [Errno 2] No such file or directory: '~/ansible_logs/logs/router_name'
Callback Exception:
  File "/usr/local/lib/python3.10/dist-packages/ansible/executor/task_queue_manager.py", line 468, in send_callback
    method(*new_args, **kwargs)
   File "/usr/local/lib/python3.10/dist-packages/ansible_collections/community/general/plugins/callback/log_plays.py", line 104, in v2_runner_on_failed
    self.log(result, 'FAILED')
   File "/usr/local/lib/python3.10/dist-packages/ansible_collections/community/general/plugins/callback/log_plays.py", line 100, in log
    with open(path, "ab") as fd:

PLAY RECAP ****************************************************************************************************************************************************
router_name         : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Friday 20 December 2024  22:23:54 +0000 (0:00:00.645)       0:00:00.765 *******
===============================================================================
Generate RSI ------------------------------------------------------------------------------------------------------------------------------------------- 0.65s
/home/username/projects/operational-ansible-playbooks/awx_test.yaml:16 ----------------------------------------------------------------------------------------
Playbook run took 0 days, 0 hours, 0 minutes, 0 seconds
@mitchell-blair
Copy link

Seconded, got the same issue when updating to 1.0.7. Had a failure when using the rpc module. Downgrading to 1.0.6 resolved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants