1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

allow openstack invetnory to work cacheless

fixes #45431
This commit is contained in:
Brian Coca 2018-09-17 18:47:42 -04:00 committed by Brian Coca
parent 66eec42f53
commit a47671aad1
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- allow using openstack inventory plugin w/o a cache

View file

@ -196,7 +196,8 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
source_data = cloud_inventory.list_hosts(
expand=expand_hostvars, fail_on_cloud_config=fail_on_errors)
self.cache.set(cache_key, source_data)
if self.cache is not None:
self.cache.set(cache_key, source_data)
self._populate_from_source(source_data)