aabouzaid / netbox-as-ansible-inventory

Ansible dynamic inventory script for Netbox.
GNU General Public License v3.0
174 stars 54 forks source link

group called "no_group" is not being populated #32

Closed LuPo closed 6 years ago

LuPo commented 6 years ago

If you want to group devices based on a chosen section (e.g.: group_by: default - rack), and some of those devices are not assigned to this section (i.e. rack), group called "no_group" is not being populated.

Also, when you leave category decommented with no group selection, it does not work. As in the following netbox.yml section:

    group_by:
        # Default section in Netbox.
        default:
        #   - device_role
        #   - rack
        #   - platform
        # Custom sections (custom_fields) could be used.
        #custom:
        #    - MAC-Address
        #    - env