master
md 65 lines 1.88 KB
Rendered Raw
1 [# Jinja template: integrations/templates/services.md
2 Renders the SD-specific 'services:' rules section.
3 - Heading is h2 'Service Rules' (sibling of Setup/Troubleshooting).
4 - Shared template-helper reference lives on the SD hub page; this section
5 only documents discoverer-specific variables.
6 - Optional `services.evaluation` h3 surfaces rule-evaluation gotchas where
7 they differ between discoverers (e.g. skip-rules in net_listeners/docker). #]
8 ## Service Rules
9
10 [[ entry.services.description ]]
11
12 [% if entry.services.evaluation is defined and (entry.services.evaluation.description or entry.services.evaluation.list) %]
13 ### How rules are evaluated
14 [% if entry.services.evaluation.description %]
15
16 [[ entry.services.evaluation.description ]]
17
18 [% endif %]
19 [% if entry.services.evaluation.list %]
20
21 [% for step in entry.services.evaluation.list %]
22 - **[[ step.name ]]** — [[ strfy(step.description) ]]
23 [% endfor %]
24
25 [% endif %]
26 [% endif %]
27 ### Template Variables
28 [% if entry.services.template_variables.description %]
29
30 [[ entry.services.template_variables.description ]]
31
32 [% endif %]
33 [% set has_types = entry.services.template_variables.list | selectattr("type","defined") | list | length > 0 %]
34 [% if has_types %]
35
36 | Variable | Type | Description |
37 |:---------|:-----|:------------|
38 [% for v in entry.services.template_variables.list %]
39 | `[[ v.name ]]` | [[ v.type if v.type is defined else "string" ]] | [[ strfy(v.description) ]] |
40 [% endfor %]
41 [% else %]
42
43 | Variable | Description |
44 |:---------|:------------|
45 [% for v in entry.services.template_variables.list %]
46 | `[[ v.name ]]` | [[ strfy(v.description) ]] |
47 [% endfor %]
48 [% endif %]
49
50 ### Examples
51 [% if entry.services.examples.description %]
52
53 [[ entry.services.examples.description ]]
54
55 [% endif %]
56 [% for example in entry.services.examples.list %]
57 #### [[ example.name ]]
58
59 [[ example.description ]]
60
61 ```yaml
62 [[ example.config ]]
63 ```
64
65 [% endfor %]