mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Made re.search string shorter
This commit is contained in:
parent
40b0471e95
commit
551b93c547
1 changed files with 1 additions and 1 deletions
|
@ -1901,7 +1901,7 @@ class LinuxVirtual(Virtual):
|
||||||
|
|
||||||
if os.path.exists('/proc/1/cgroup'):
|
if os.path.exists('/proc/1/cgroup'):
|
||||||
for line in open('/proc/1/cgroup').readlines():
|
for line in open('/proc/1/cgroup').readlines():
|
||||||
if re.search('/lxc/.*$', line):
|
if re.search('/lxc/', line):
|
||||||
self.facts['virtualization_type'] = 'lxc'
|
self.facts['virtualization_type'] = 'lxc'
|
||||||
self.facts['virtualization_role'] = 'guest'
|
self.facts['virtualization_role'] = 'guest'
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue