Ansible module - vyos_vlan - Invalid value error - VyOS 1.3 version

Hi ,

I am using ansible vyos_vlan module to setup VIF.

I am getting below error.

“msg”: "set interfaces ethernet eth1 vif 1048 address 10.41.172.0/24\r\n\r\r\n \r\n \r\n \r\n Invalid value\r\n Value validation failed\r\n Set failed\r\n\r\n\r[edit]\r\r\n********@testingtesting20#

EXEC /bin/sh -c ‘rm -f -r /root/.ansible/tmp/ansible-tmp-1637248687.473055-684262-193131473725293/ > /dev/null 2>&1 && sleep 0’

The full traceback is:

File “/tmp/ansible_..vlan_payload_qlqx_mb2/ansible.._vlan_payload.zip/ansible_collections///plugins/module_utils/network//.py”, line 125, in load_config

candidate=commands, commit=commit, comment=comment

File “/tmp/ansible_..vlan_payload_qlqx_mb2/ansible.._vlan_payload.zip/ansible/module_utils/connection.py”, line 200, in rpc

raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)

fatal: [localhost]: FAILED! => {

"changed": false,

"invocation": {

    "module_args": {

        "address": "10.41.172.0/24",

        "aggregate": null,

        "associated_interfaces": null,

        "delay": 10,

        "interfaces": [

            "eth1"

        ],

        "name": null,

        "provider": {

            "host": "10.41.170.200",

            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",

            "port": null,

            "ssh_keyfile": null,

            "timeout": null,

            "username": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"

        },

        "purge": false,

        "state": "present",

        "vlan_id": 1048

    }

},

"msg": "set interfaces ethernet eth1 vif 1048 address 10.41.172.0/24\r\n\r\r\n  \r\n  \r\n  \r\n  Invalid value\r\n  Value validation failed\r\n  Set failed\r\n\r\n\r[edit]\r\r\n********@testingtesting20# "

}

I am getting the same error when I am trying to run the command manually in the VM.

What could be the issue?

Please, verify IP address assigned (you are setting a network address, not a host address).

set interfaces ethernet eth1 vif 1048 address 10.41.172.0/24

I guess you mean

set interfaces ethernet eth1 vif 1048 address 10.41.172.1/24

Thanks @n.fort my bad!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.