{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# ansible-cached-lookup\n\nAn Ansible lookup plugin that caches the results of any other lookup, most\nuseful in group/host vars.\n\nBy default, Ansible evaluates any lookups in a group/host var whenever the var\nis accessed. For example, given a group/host var:\n\n```yaml\ncontent: \"{{ lookup('pipe', 'a-very-slow-command' }}\"\n```\n\nany tasks that access `content` (e.g. in a template) will re-evaluate the\nlookup, which adds up very quickly. See\n[ansible/ansible#9263](https://github.com/ansible/ansible/issues/9623).\n\n## Installation\n\n1. Pick a name that you want to use to call this plugin in Ansible playbooks.\n This documentation assumes you're using the name `cached`.\n\n ```\n pip install ansible-cached-lookup\n ```\n\n2. Create a `lookup_plugins` directory in the directory in which you run Ansible.\n\n By default, Ansible will look for lookup plugins in an `lookup_plugins` folder\n adjacent to the running playbook. For more information on this, or to change\n the location where Ansible looks for lookup plugins, see the [Ansible\n docs](https://docs.ansible.com/ansible/dev_guide/developing_plugins.html#distributing-plugins).\n\n3. Create a file called `cached.py` (or whatever name you picked) in the\n `lookup_plugins` directory, with one line:\n\n ```py\n from ansible_cached_lookup import LookupModule\n ```\n\n## Contributing\n\nTo run the tests, run `tox`.\n\nTo format code to pass `tox -e lint`, run `tox -e format`.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ansible-cached-lookup", "package_url": "https://pypi.org/project/ansible-cached-lookup/", "platform": "", "project_url": "https://pypi.org/project/ansible-cached-lookup/", "project_urls": null, "release_url": "https://pypi.org/project/ansible-cached-lookup/1.0.0/", "requires_dist": [ "ansible", "diskcache" ], "requires_python": "", "summary": "An Ansible lookup plugin that caches the result of any other lookup", "version": "1.0.0" }, "last_serial": 4536516, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "237a78795527f154a5a331dbcbc5d8dd", "sha256": "40583c5d1181a6d0e45ed76b3955aa9371f03d592e35cc7010bdb2f0e0d44e93" }, "downloads": -1, "filename": "ansible_cached_lookup-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "237a78795527f154a5a331dbcbc5d8dd", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3289, "upload_time": "2018-11-28T00:58:32", "url": "https://files.pythonhosted.org/packages/61/94/1af73ef9a16d571feaef7af3f5c26e0262a5760d82fc24cdfff47518fcfb/ansible_cached_lookup-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ab7b32eaa3d23da67a8fac153e4fa067", "sha256": "3419bde73777a1e0b578cbc693b4529072ae84499ea6a51ef52cf1d29f91053a" }, "downloads": -1, "filename": "ansible-cached-lookup-0.1.0.tar.gz", "has_sig": false, "md5_digest": "ab7b32eaa3d23da67a8fac153e4fa067", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4898, "upload_time": "2018-11-28T00:58:35", "url": "https://files.pythonhosted.org/packages/57/35/49fccc253db2f8a2887d9c1f8a2bb6b5fc6e966f2948090a9fca0aa1c20f/ansible-cached-lookup-0.1.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "9436bbb80d6217b428271cca82ae0000", "sha256": "cb59a1dd4525513e11a89afe1821df829fbd566b0f37e3d330b8a41d6a52a810" }, "downloads": -1, "filename": "ansible_cached_lookup-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9436bbb80d6217b428271cca82ae0000", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3273, "upload_time": "2018-11-28T01:10:23", "url": "https://files.pythonhosted.org/packages/e0/30/293d3610adf4c11f13dee7c0fd32279b5df90a937de13cc283d2ea7e236b/ansible_cached_lookup-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f1cb66da947eeb040488e2aa2bc0d85f", "sha256": "64c3009d6f64aa32dc738332bec02add3eeb57c0636215a4bb678dc352bf7a6a" }, "downloads": -1, "filename": "ansible-cached-lookup-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f1cb66da947eeb040488e2aa2bc0d85f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4864, "upload_time": "2018-11-28T01:10:25", "url": "https://files.pythonhosted.org/packages/b5/7c/19665493a4f7637a413ff15a1b981bbbd847886c168b6844d9cb0d96fe8d/ansible-cached-lookup-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9436bbb80d6217b428271cca82ae0000", "sha256": "cb59a1dd4525513e11a89afe1821df829fbd566b0f37e3d330b8a41d6a52a810" }, "downloads": -1, "filename": "ansible_cached_lookup-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9436bbb80d6217b428271cca82ae0000", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3273, "upload_time": "2018-11-28T01:10:23", "url": "https://files.pythonhosted.org/packages/e0/30/293d3610adf4c11f13dee7c0fd32279b5df90a937de13cc283d2ea7e236b/ansible_cached_lookup-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f1cb66da947eeb040488e2aa2bc0d85f", "sha256": "64c3009d6f64aa32dc738332bec02add3eeb57c0636215a4bb678dc352bf7a6a" }, "downloads": -1, "filename": "ansible-cached-lookup-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f1cb66da947eeb040488e2aa2bc0d85f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4864, "upload_time": "2018-11-28T01:10:25", "url": "https://files.pythonhosted.org/packages/b5/7c/19665493a4f7637a413ff15a1b981bbbd847886c168b6844d9cb0d96fe8d/ansible-cached-lookup-1.0.0.tar.gz" } ] }