Identifying a host based on facts

Problem: I need to identify hosts, if it’s a physical machine or a VM. Is there maybe a fact which indicates that?

Foreman and Proxy versions: 1.21.3

What facts are available depends on the configuration management tool you use. Where do you need access to the data? In Foreman templates?

I need the information somewhere in a hosts facts list via API.
Puppet is providing the facts into Foreman. Not sure if there is a default fact which can indicate that.

Ha! And while I was search for the correct API endpoint, I found is_virtual in the docs accidentally :slight_smile:
Should do it I guess…

1 Like