Debian Codegraph @

lib/ansible/plugins/doc_fragments/inventory_cache.py

raw
1 # -*- coding: utf-8 -*-
2
3 # Copyright: (c) 2017, Ansible Project
4 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
5 from __future__ import annotations
6
7
8 class ModuleDocFragment(object):
9
10 # inventory cache
11 DOCUMENTATION = r"""
12 options:
13 cache:
14 description:
15 - Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work.
16 type: bool
17 default: no
18 env:
19 - name: ANSIBLE_INVENTORY_CACHE
20 ini:
21 - section: inventory
22 key: cache
23 cache_plugin:
24 description:
25 - Cache plugin to use for the inventory's source data.
26 type: str
27 default: memory
28 env:
29 - name: ANSIBLE_CACHE_PLUGIN
30 - name: ANSIBLE_INVENTORY_CACHE_PLUGIN
31 ini:
32 - section: defaults
33 key: fact_caching
34 - section: inventory
35 key: cache_plugin
36 cache_timeout:
37 description:
38 - Cache duration in seconds.
39 default: 3600
40 type: int
41 env:
42 - name: ANSIBLE_CACHE_PLUGIN_TIMEOUT
43 - name: ANSIBLE_INVENTORY_CACHE_TIMEOUT
44 ini:
45 - section: defaults
46 key: fact_caching_timeout
47 - section: inventory
48 key: cache_timeout
49 cache_connection:
50 description:
51 - Cache connection data or path, read cache plugin documentation for specifics.
52 type: str
53 env:
54 - name: ANSIBLE_CACHE_PLUGIN_CONNECTION
55 - name: ANSIBLE_INVENTORY_CACHE_CONNECTION
56 ini:
57 - section: defaults
58 key: fact_caching_connection
59 - section: inventory
60 key: cache_connection
61 cache_prefix:
62 description:
63 - Prefix to use for cache plugin files/tables.
64 default: ansible_inventory_
65 env:
66 - name: ANSIBLE_CACHE_PLUGIN_PREFIX
67 - name: ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX
68 ini:
69 - section: defaults
70 key: fact_caching_prefix
71 - section: inventory
72 key: cache_prefix
73 """