Add support for podman in virtualization facts (#64981)
Check additional file check virtualization facts for podman Fixes: #64954 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
f8216db21f
commit
2e82989b3b
2 changed files with 6 additions and 0 deletions
2
changelogs/fragments/64954_virtualization_podman.yml
Normal file
2
changelogs/fragments/64954_virtualization_podman.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- Support virtualization for podman container (https://github.com/ansible/ansible/issues/64954).
|
|
@ -54,6 +54,10 @@ class LinuxVirtual(Virtual):
|
|||
virtual_facts['virtualization_type'] = 'lxc'
|
||||
virtual_facts['virtualization_role'] = 'guest'
|
||||
return virtual_facts
|
||||
if re.search('container=podman', line):
|
||||
virtual_facts['virtualization_type'] = 'podman'
|
||||
virtual_facts['virtualization_role'] = 'guest'
|
||||
return virtual_facts
|
||||
|
||||
if os.path.exists('/proc/vz') and not os.path.exists('/proc/lve'):
|
||||
virtual_facts['virtualization_type'] = 'openvz'
|
||||
|
|
Loading…
Reference in a new issue