[PR #8098/d62fe154 backport][stable-8] inventory plugins: make data obtained from remote unsafe (#8146)

inventory plugins: make data obtained from remote unsafe (#8098)

Make data obtained from remote unsafe.

(cherry picked from commit d62fe154d2)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot]
2024-03-25 06:50:08 +01:00
committed by GitHub
parent baa45d044c
commit df95f02c7b
14 changed files with 88 additions and 51 deletions

View File

@@ -82,6 +82,7 @@ from time import sleep
from ansible.errors import AnsibleError
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
from ansible.utils.unsafe_proxy import wrap_var as make_unsafe
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
@@ -347,4 +348,4 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
self.protocol = 'ws'
objects = self._get_objects()
self._populate(objects)
self._populate(make_unsafe(objects))