perf: asset gather fact (#9511)

Co-authored-by: feng <1304903146@qq.com>
pull/9513/head
fit2bot 2023-02-10 18:50:11 +08:00 committed by GitHub
parent 564a87304c
commit 64f21a518a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,8 @@ class GatherFactsManager(BasePlaybookManager):
info = result.get('debug', {}).get('res', {}).get('info', {})
asset = self.host_asset_mapper.get(host)
if asset and info:
for k, v in info.items():
info[k] = v.strip()
asset.info = info
asset.save()
else: