mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 23:31:25 -07:00
Bump version to 2.0.0 (#1369)
* Bump version to 2.0.0. * Remove deprecated 2.0.0 features. * Test for failure. * Fix cache plugin unit tests. * Accept direct import only for Ansible 2.9.
This commit is contained in:
parent
25c52d56bd
commit
1db167b12a
9 changed files with 21 additions and 50 deletions
7
plugins/cache/redis.py
vendored
7
plugins/cache/redis.py
vendored
|
@ -69,6 +69,7 @@ from ansible.errors import AnsibleError
|
|||
from ansible.module_utils._text import to_native
|
||||
from ansible.parsing.ajson import AnsibleJSONEncoder, AnsibleJSONDecoder
|
||||
from ansible.plugins.cache import BaseCacheModule
|
||||
from ansible.release import __version__ as ansible_base_version
|
||||
from ansible.utils.display import Display
|
||||
|
||||
try:
|
||||
|
@ -103,9 +104,9 @@ class CacheModule(BaseCacheModule):
|
|||
self._keys_set = self.get_option('_keyset_name')
|
||||
self._sentinel_service_name = self.get_option('_sentinel_service_name')
|
||||
except KeyError:
|
||||
display.deprecated('Rather than importing CacheModules directly, '
|
||||
'use ansible.plugins.loader.cache_loader',
|
||||
version='2.0.0', collection_name='community.general') # was Ansible 2.12
|
||||
# TODO: remove once we no longer support Ansible 2.9
|
||||
if not ansible_base_version.startswith('2.9.'):
|
||||
raise AnsibleError("Do not import CacheModules directly. Use ansible.plugins.loader.cache_loader instead.")
|
||||
if C.CACHE_PLUGIN_CONNECTION:
|
||||
uri = C.CACHE_PLUGIN_CONNECTION
|
||||
self._timeout = float(C.CACHE_PLUGIN_TIMEOUT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue