mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
VMware: fix path for hw_files (#49116)
Fixes: #48929 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
449b7e9f10
commit
d37386d2c7
1 changed files with 4 additions and 3 deletions
|
@ -314,11 +314,12 @@ def gather_vm_facts(content, vm):
|
||||||
facts['hw_files'] = [files.vmPathName]
|
facts['hw_files'] = [files.vmPathName]
|
||||||
for item in layout.snapshot:
|
for item in layout.snapshot:
|
||||||
for snap in item.snapshotFile:
|
for snap in item.snapshotFile:
|
||||||
facts['hw_files'].append(files.snapshotDirectory + snap)
|
if 'vmsn' in snap:
|
||||||
|
facts['hw_files'].append(snap)
|
||||||
for item in layout.configFile:
|
for item in layout.configFile:
|
||||||
facts['hw_files'].append(os.path.dirname(files.vmPathName) + '/' + item)
|
facts['hw_files'].append(os.path.join(os.path.dirname(files.vmPathName), item))
|
||||||
for item in vm.layout.logFile:
|
for item in vm.layout.logFile:
|
||||||
facts['hw_files'].append(files.logDirectory + item)
|
facts['hw_files'].append(os.path.join(files.logDirectory, item))
|
||||||
for item in vm.layout.disk:
|
for item in vm.layout.disk:
|
||||||
for disk in item.diskFile:
|
for disk in item.diskFile:
|
||||||
facts['hw_files'].append(disk)
|
facts['hw_files'].append(disk)
|
||||||
|
|
Loading…
Reference in a new issue