On 7/14/20 5:21 PM, Orion Poplawski wrote:
I'm working on converting the old cobbler inventory script to an inventory plugin. See https://github.com/ansible-collections/community.general/pull/627The behavior that I last had with my last version of the inventory script was for it to fall back to the cached data regardless of the time since last update if it could not contact the cobbler server. This allows for ansible-pull to work off of our internal network. However, with the use of cache plugins (jsonfile in my case) I do not see a way to achieve this. Any suggestions?
This is what I've come up with: self._options['cache_timeout'] = 0 self.load_cache_plugin() self._cache.get(self.cache_key, {}) seems to work. -- Orion Poplawski Manager of NWRA Technical Systems 720-772-5637 NWRA, Boulder/CoRA Office FAX: 303-415-9702 3380 Mitchell Lane or...@nwra.com Boulder, CO 80301 https://www.nwra.com/ -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/b125c248-625d-c24f-aa14-57b19f6c61cb%40nwra.com.
smime.p7s
Description: S/MIME Cryptographic Signature