Ansible error - "msg": "q must be exactly 160, 224, or 256 bits long"}

Hi I am trying to configure a VyOS VM deployed on ovirt.

I am getting “msg”: “q must be exactly 160, 224, or 256 bits long”} error when trying to configure VyOS VM.
I am using vyos_vlan module.

My inventory file looks like below

j3rrvyos1 ansible_ssh_host= ansible_user=vyos ansible_ssh_pass=vyos ansible_network_os=vyos ansible_connection=network_cli ansible_python_interpreter=/usr/bin/python3

I am not sure why I am getting this q error when trying to configure the vm.

~Below is the module I am trying to execute.

  • name: Configure virtual LAN’s and interface address
    vlan_id: “{{ }}”
    interfaces: “eth1”
    address: “{{ networks.value.ipv4 }}/24”
    name: “{{ }}”

Hi @qwerty,

The problem seems to be on the control host side, not the VyOS side.

Could you provide the contents of the .ssh/config file of the user from which the Ansible scripts run?

Hi @Nikolay , there is no ssh/config file.

I temporary fixed by switching switch ssh type from paramiko to libssh and now it is working.
It looks there might be bug for paramiko.

<> attempting to start connection
<> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /usr/local/bin/ansible-connection
<> found existing local domain socket, using it!
**<> invoked shell using ssh_type: libssh**
<> ssh connection done, setting terminal
<> loaded terminal plugin for network_os vyos.vyos.vyos
<> firing event: on_open_shell()
<> ssh connection has completed successfully
<> updating play_context for connection
<> local domain socket path is /root/.ansible/pc/6b5c2da01c
redirecting (type: action) vyos.vyos.vyos_vlan to vyos.vyos.vyos
redirecting (type: action) vyos.vyos.vyos_vlan to vyos.vyos.vyos
[WARNING]: provider is unnecessary when using network_cli and will be ignored
<> ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended