Adding check to ensure 'container' get's added to guest_tech when appropriate (#71385)

pull/71989/head
Carlos Matos 4 years ago committed by GitHub
parent 94522b7c10
commit cbd3df369f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
minor_changes:
- linux facts - Add additional check to ensure 'container' virtual fact gets added to guest_tech when appropriate (https://github.com/ansible/ansible/pull/71385)

@ -104,6 +104,10 @@ class LinuxVirtual(Virtual):
virtual_facts['virtualization_role'] = 'guest'
found_virt = True
# ensure 'container' guest_tech is appropriately set
if guest_tech.intersection(set(['docker', 'lxc', 'podman', 'openvz'])) or systemd_container:
guest_tech.add('container')
if os.path.exists("/proc/xen"):
is_xen_host = False
try:

Loading…
Cancel
Save