On 07. feb. 2017 19:15, Simon Wydooghe wrote:
Does anyone have a suggestion on how to detect whether a machine is a bare
metal one or a virtual one using the existing Ansible facts? In Puppet
there was a 'physical' boolean which could be used, but going through the
Ansible facts of an example host here, I can't quite figure out something I
can use. Am I missing something? I could of course write my own fact, but
I'd like to check here to see if that can be avoided.

You have ansible_virtualization_role, host or guest.

If you would like to find out which hypervisor you can check the
ansible_virtualization_type.


--
Kai Stian Olstad

--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b617a8d7-5eae-a0a7-c585-71be3af1e82e%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to