summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins/cache/jsonfile.py
Commit message (Collapse)AuthorAgeFilesLines
* Enable documentation in pluginsBrian Coca2017-03-231-1/+9
| | | | | | | | | | | | | Made ansible-doc more plugin agnostic We can have docs in lookup, callback, connectionm strategy, etc Use first docstring and make pepizis happy generalized module_docs to plugin_docs documented cartesian, ssh, default, jsonfile, etc as examples changed lack of docs to warning when listing made smarter about bad docstrings better blacklisting added handling of options/config/envs/etc move blacklist to find_plugins, only need once
* put cache base classes in __init__ (#22809)Brian Coca2017-03-231-1/+1
| | | | | | * put cache base classes in __init__ * added placeholder
* Make BaseFileCache into an abstractbaseclass so it's a proper interfaceToshio Kuratomi2017-02-221-5/+9
| | | | | Push the opening and closing of files into the _load and _dump methods so that we don't invoke the slow codec machinery without reason.
* added pickle and yaml cache pluginsBrian Coca2017-02-221-147/+7
| | | | | | | added new base class for file based cache plugins as 99% of code was common now also catches unexpected decoding exceptions allows per module file modes and encoding moved jsonfile code to base
* Fix error using jsonfile with incomplete config (#17567)Adrian Likins2016-09-161-1/+5
| | | | | | | If 'fact_caching=jsonfile' was configured, but 'fact_caching_connection' was not configured, jsonfile would fail and ansible-playbook would exit with a traceback. Fixes #17566
* Make jsonfile cache plugin errors less vague. (#17568)Adrian Likins2016-09-141-8/+9
|
* [wip] Let jsonfile and memcached cache plugins understand ↵Adrian Likins2016-09-141-0/+3
| | | | | | | | | | | fact_caching_timeout=0 (#17565) * Add support for no-expiration to jsonfile cache * Let memcached cache use fact_caching_timeout=0 If fact_cache=memcached and fact_caching_timeout=0 memcached would hit a NameError on _expire_keys
* Move uses of to_bytes, to_text, to_native to use the module_utils version ↵Toshio Kuratomi2016-09-061-1/+1
| | | | | | | | (#17423) We couldn't copy to_unicode, to_bytes, to_str into module_utils because of licensing. So once created it we had two sets of functions that did the same things but had different implementations. To remedy that, this change removes the ansible.utils.unicode versions of those functions.
* Allow to make the jsonfile cache files pretty (indented and sorted) (#17000)Dag Wieers2016-08-081-1/+1
| | | | | | | | | | * Allow to make the jsonfile cache files pretty (indented and sorted) Since the json cache files are condensed, it is not very practical to look for something in them. Having indented/sorted cache files makes debugging and playbook/inventory development a lot easier to do. I made it configurable in case people would object to the performance hit this would have, but to be honest, then they probably should be looking at other cache plugins instead IMO. * Removed the config option and documentation changes
* ignore closing file error when file not openBrian Coca2016-06-141-1/+4
| | | | fixes #16268
* restore old jsonfile behaviour on key expirationBrian Coca2016-05-101-3/+6
| | | | | fixes #14456, now it won't expire keys in middle of a play when they were 'valid' at 'gather time'.
* Expand tilde after expanding varsToshio Kuratomi2016-04-051-1/+1
|
* substitute tilde and env vars before storing C.CACHE_PLUGIN_CONNECTION as ↵Daniel Menet2015-11-121-1/+1
| | | | instance attribute
* Finish up plugin porting to global displayToshio Kuratomi2015-11-111-1/+0
| | | | Also remove display = display which does nothing
* Port cache plugins to global displayToshio Kuratomi2015-11-111-9/+17
|
* Add python3-compat boilerplate to all .py files in lib/ansibleToshio Kuratomi2015-10-191-0/+4
|
* Cleanup some pyflakes warning (1 real error)Toshio Kuratomi2015-10-191-2/+2
|
* Fixing logic in json cache plugin get()James Cammarata2015-10-171-16/+13
| | | | Fixes #12722
* added missing cachefile and changed str(e) to to_bytes(e)Brian Coca2015-10-131-6/+8
|
* Add variable for format parameterJames Cammarata2015-10-131-1/+1
|
* Fixing bugs related to jfonfile cache pluginJames Cammarata2015-10-121-4/+8
| | | | | | | | | * corrupt/invalid file causes tracebacks * incorrect initialization of display/_display in BaseCacheModule class * tweaking the way errors in get() on jsonfile caches work, to raise a proper AnsibleError in that situation so the playbook/task is stopped Fixes #12708
* Use 'except ... as' syntaxMarius Gedminas2015-08-271-6/+6
| | | | | | This syntax works on Python 2.6 through 3.x. lib/ansible/module_utils (and lib/ansible/modules) need to support Python 2.4, so I didn't touch those.
* adding display to plugins and start moving debug to displayBrian Coca2015-07-231-12/+6
|
* Fixing up fact_cache use in VariableManagerJames Cammarata2015-07-131-1/+1
|
* Removing stray debugging printJames Cammarata2015-07-131-1/+0
|
* Moving jsonfile cache plugin over and fixing #10883James Cammarata2015-07-131-0/+159
Fixes #10883