parent
c18eb52ade
commit
71ad7da2f8
2 changed files with 4 additions and 6 deletions
3
changelogs/fragments/remove_redundant_md5.yml
Normal file
3
changelogs/fragments/remove_redundant_md5.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
bugfixes:
|
||||
- remove rendundant path uniquifying in inventory plugins. This removes
|
||||
use of md5 hashing and fixes inventory plugins when run in FIPS mode.
|
|
@ -251,7 +251,7 @@ class Cacheable(object):
|
|||
_cache = {}
|
||||
|
||||
def get_cache_key(self, path):
|
||||
return "{0}_{1}_{2}".format(self.NAME, self._get_cache_prefix(path), self._get_config_identifier(path))
|
||||
return "{0}_{1}".format(self.NAME, self._get_cache_prefix(path))
|
||||
|
||||
def _get_cache_prefix(self, path):
|
||||
''' create predictable unique prefix for plugin/inventory '''
|
||||
|
@ -266,11 +266,6 @@ class Cacheable(object):
|
|||
|
||||
return 's_'.join([d1[:5], d2[:5]])
|
||||
|
||||
def _get_config_identifier(self, path):
|
||||
''' create predictable config-specific prefix for plugin/inventory '''
|
||||
|
||||
return hashlib.md5(path.encode()).hexdigest()
|
||||
|
||||
def clear_cache(self):
|
||||
self._cache = {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue