Add is_live to your Pyramid requests
Project description
ansible-cached-lookup
An Ansible lookup plugin that caches the results of any other lookup, most useful in group/host vars.
By default, Ansible evaluates any lookups in a group/host var whenever the var is accessed. For example, given a group/host var:
content: "{{ lookup('pipe', 'a-very-slow-command' }}"
any tasks that access content
(e.g. in a template) will re-evaluate the
lookup, which adds up very quickly. See
ansible/ansible#9263.
Installation
-
Pick a name that you want to use to call this plugin in Ansible playbooks. This documentation assumes you're using the name
cached
.pip install ansible-cached-lookup
-
Create a
lookup_plugins
directory in the directory in which you run Ansible.By default, Ansible will look for lookup plugins in an
lookup_plugins
folder adjacent to the running playbook. For more information on this, or to change the location where Ansible looks for lookup plugins, see the Ansible docs. -
Create a file called
cached.py
(or whatever name you picked) in thelookup_plugins
directory, with one line:from ansible_cached_lookup import LookupModule
Contributing
To run the tests, run tox
.
To format code to pass tox -e lint
, run tox -e format
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ansible-cached-lookup-0.1.0.tar.gz
.
File metadata
- Download URL: ansible-cached-lookup-0.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3419bde73777a1e0b578cbc693b4529072ae84499ea6a51ef52cf1d29f91053a |
|
MD5 | ab7b32eaa3d23da67a8fac153e4fa067 |
|
BLAKE2b-256 | 573549fccc253db2f8a2887d9c1f8a2bb6b5fc6e966f2948090a9fca0aa1c20f |
File details
Details for the file ansible_cached_lookup-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: ansible_cached_lookup-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40583c5d1181a6d0e45ed76b3955aa9371f03d592e35cc7010bdb2f0e0d44e93 |
|
MD5 | 237a78795527f154a5a331dbcbc5d8dd |
|
BLAKE2b-256 | 61941af73ef9a16d571feaef7af3f5c26e0262a5760d82fc24cdfff47518fcfb |