I have created a custom inventory and I am attempting to set hosts to off. I have tried to follow the output of the ovirt inventory source plugin. I notice it creates groups named status_up and status_down and adds an attribute named status to entries that say “up” or “down” as part of _meta->hostvars for individual host entries. Neither of these have been successful for me when attempting to do the same for a custom inventory and I am not finding much on the topic in documentation either. Anyway, you will see what I mean in the attached image. Notice how the ManageIQ vm is down. How do I get a custom inventory to do the same?
In your file-based settings you have to set CUSTOM_ENABLED_VAR and CUSTOM_ENABLED_VALUE to reflect how your import’s hostvars signal on/off state.
Note that is for custom inventory script. If you add an inventory source source from a project, there are different variables for those, like SCM_ENABLED_VAR.