Another Idea could be to include a local fact in the image that you base
your virtual machines on. Or put it there in an earlier stage after the
machine has been provisioned.
See this link:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_vars_facts.html#adding-custom-facts
Oskar.
On 8/24/21 6:03 PM, Jorge Rúa wrote:
Have a look to virt-what
On Tue, Aug 24, 2021, 17:38 Roberto Paz <[email protected]
<mailto:[email protected]>> wrote:
I required to do that ìn the past and the best way I found was to
access the kernel information:
*shell: 'dmesg | grep "Hypervisor detected"'*
I had to identify VMWare-based VMs or Physical server at that time.
El martes, 24 de agosto de 2021 a la(s) 05:00:34 UTC-5,
[email protected] <mailto:[email protected]> escribió:
Hi everyone,
Please help me to find host is virtual or physical from
ansible facts.
Thanks.
Is it possible to get the details from
"ansible_virtualization_type". Or is there any better idea.
Thanks in advance
--
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]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/26757f0a-a270-4db0-b98d-fabda0a4451cn%40googlegroups.com
<https://groups.google.com/d/msgid/ansible-project/26757f0a-a270-4db0-b98d-fabda0a4451cn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAFtje5PK-b0S8N1ZPPLgAxNw7ch4G_Ze1VaQ2W3cG9zECBp5YQ%40mail.gmail.com
<https://groups.google.com/d/msgid/ansible-project/CAFtje5PK-b0S8N1ZPPLgAxNw7ch4G_Ze1VaQ2W3cG9zECBp5YQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/ff964215-64df-1325-9600-16092b2b66b2%40mullvad.net.