Skip to content

Instantly share code, notes, and snippets.

@Ruchip16
Created October 5, 2025 12:43
Show Gist options
  • Save Ruchip16/c9f955731d62682973c346e03d2ad09d to your computer and use it in GitHub Desktop.
Save Ruchip16/c9f955731d62682973c346e03d2ad09d to your computer and use it in GitHub Desktop.
Fix warnings

How to fix the warnings reported:

There were 3 warnings reported in the logs:

  1. Plugin-load warning ('NoneType' object has no attribute 'get')

Warning:

[WARNING]: errors were encountered during the plugin load for junipernetworks.junos.junos_command: ["'NoneType' object has no attribute 'get'"]

This occurs because the meta/runtime.yml file in the junipernetworks.junos collection contains an empty action: key under plugin_routing. When Ansible tries to parse this section, it expects a dictionary but encounters None, leading to this warning.

Resolution: Removing the unused action: key (or defining it as an empty dictionary) from meta/runtime.yml resolves the issue completely. Example corrected section:

plugin_routing:
  modules:
    junos_command:
      redirect: juniper.device.junos_command

This change ensures Ansible can correctly interpret plugin routes and eliminates the 'NoneType' object has no attribute 'get' warning.

  1. ansible-pylibssh not installed warning

Warning:

[WARNING]: ansible-pylibssh not installed, falling back to paramiko

This is a general performance-related warning. Ansible falls back to the default paramiko transport when the optional ansible-pylibssh package is not installed.

Resolution: Installing the library will remove the warning and improve SSH performance warning Run inside the same virtual environment:

sudo apt install libssh-dev  # or 'yum install libssh-devel' on RHEL/CentOS
pip install ansible-pylibssh
  1. Unsupported arguments warning

Warning:

[WARNING]: arguments wait_for, match, rpcs are not supported when using transport=cli

This warning appears because the inventory specifies:

ansible_connection=ansible.netcommon.network_cli

while the playbook uses connection: netconf. The inventory setting takes precedence, so the module runs in CLI mode, where NETCONF-only arguments (wait_for, match, rpcs) aren’t applicable.

Resolution: To align the connection type:

  • If you intend to use NETCONF (recommended), update inventory to:
  • ansible_connection=ansible.netcommon.netconf

Alternatively, if CLI mode is intentional, remove those NETCONF-only arguments from the task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment