summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 04:06:05 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 04:06:05 +0000
commita9cdf48d72d207240041b1006ca674ee103a2f5e (patch)
tree5b28f7ee3ff8d5ad4217e91b01dcf469c22f4fd4
parent849c63ddc62705cdef021d06bed19e84e1cee528 (diff)
automatic import of python-ansible-cached-lookupopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-ansible-cached-lookup.spec212
-rw-r--r--sources1
3 files changed, 214 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..80bb401 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/ansible-cached-lookup-1.0.0.tar.gz
diff --git a/python-ansible-cached-lookup.spec b/python-ansible-cached-lookup.spec
new file mode 100644
index 0000000..fdf8b84
--- /dev/null
+++ b/python-ansible-cached-lookup.spec
@@ -0,0 +1,212 @@
+%global _empty_manifest_terminate_build 0
+Name: python-ansible-cached-lookup
+Version: 1.0.0
+Release: 1
+Summary: An Ansible lookup plugin that caches the result of any other lookup
+License: MIT
+URL: https://pypi.org/project/ansible-cached-lookup/
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b5/7c/19665493a4f7637a413ff15a1b981bbbd847886c168b6844d9cb0d96fe8d/ansible-cached-lookup-1.0.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-ansible
+Requires: python3-diskcache
+
+%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:
+
+```yaml
+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](https://github.com/ansible/ansible/issues/9623).
+
+## Installation
+
+1. 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
+ ```
+
+2. 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](https://docs.ansible.com/ansible/dev_guide/developing_plugins.html#distributing-plugins).
+
+3. Create a file called `cached.py` (or whatever name you picked) in the
+ `lookup_plugins` directory, with one line:
+
+ ```py
+ 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`.
+
+
+
+
+%package -n python3-ansible-cached-lookup
+Summary: An Ansible lookup plugin that caches the result of any other lookup
+Provides: python-ansible-cached-lookup
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-ansible-cached-lookup
+# 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:
+
+```yaml
+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](https://github.com/ansible/ansible/issues/9623).
+
+## Installation
+
+1. 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
+ ```
+
+2. 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](https://docs.ansible.com/ansible/dev_guide/developing_plugins.html#distributing-plugins).
+
+3. Create a file called `cached.py` (or whatever name you picked) in the
+ `lookup_plugins` directory, with one line:
+
+ ```py
+ 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`.
+
+
+
+
+%package help
+Summary: Development documents and examples for ansible-cached-lookup
+Provides: python3-ansible-cached-lookup-doc
+%description help
+# 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:
+
+```yaml
+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](https://github.com/ansible/ansible/issues/9623).
+
+## Installation
+
+1. 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
+ ```
+
+2. 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](https://docs.ansible.com/ansible/dev_guide/developing_plugins.html#distributing-plugins).
+
+3. Create a file called `cached.py` (or whatever name you picked) in the
+ `lookup_plugins` directory, with one line:
+
+ ```py
+ 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`.
+
+
+
+
+%prep
+%autosetup -n ansible-cached-lookup-1.0.0
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-ansible-cached-lookup -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..a724082
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+f1cb66da947eeb040488e2aa2bc0d85f ansible-cached-lookup-1.0.0.tar.gz