mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-18 16:31:26 -07:00
inventory plugins: make data obtained from remote unsafe (#8098)
Make data obtained from remote unsafe.
This commit is contained in:
parent
b389f8637f
commit
d62fe154d2
14 changed files with 88 additions and 51 deletions
|
@ -72,6 +72,7 @@ from ansible.plugins.inventory import (
|
|||
Cacheable
|
||||
)
|
||||
from ansible.utils.display import Display
|
||||
from ansible.utils.unsafe_proxy import wrap_var as make_unsafe
|
||||
|
||||
|
||||
display = Display()
|
||||
|
@ -271,7 +272,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
|||
if not cache or cache_needs_update:
|
||||
results = self._query()
|
||||
|
||||
self._populate(results)
|
||||
self._populate(make_unsafe(results))
|
||||
|
||||
# If the cache has expired/doesn't exist or
|
||||
# if refresh_inventory/flush cache is used
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue