community-fabric / ipfabric-ansible

Ansible Collection for managing IPFabric
MIT License
1 stars 0 forks source link

Platforms containing only numbers (ie ASA 5500) being converted to int causing failure #25

Closed matthewpomeryssq closed 1 year ago

matthewpomeryssq commented 1 year ago

When attempting to group by platform in the ipfabric inventory module: ie: keyed_groups:

A failure occurs if any of the device platform values contain only numbers: ie: platform=5500

The error generated is:

I suspect the values returned by the query must be type cast as strings.

minitriga commented 1 year ago

Fixed the issue, installed 0.0.2 from ansible galaxy using ansible-galaxy collection install community_fabric.ansible and it should work.

Let me know if there are any issues.

    "p_5500": {
        "hosts": [
            "HWLAB-FW-C5510"
        ]
    },
    "p_asav": {
        "hosts": [
            "L1FW1",
            "L35FW1",
            "L35FW2",
            "L68ASAV5",
            "L68ASAV6"
        ]
    }
}
matthewpomeryssq commented 1 year ago

Looks good!