This repository was archived by the owner on Sep 26, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 77 Files Switch (TOFS) pattern.
88
99 Params:
10- * prefix: pillar prefix to custom ':files_switch'. Colons ':'
11- are replaced by '/' to be used as directory prefix (<path_prefix>)
1210 * files: ordered list of files to look for
1311 * default_files_switch: if there's no pillar
14- '<prefix> :files_switch' this is the ordered list of grains to
12+ '<tplroot>:tofs :files_switch' this is the ordered list of grains to
1513 use as selector switch of the directories under
1614 "<path_prefix>/files"
1715 * indent_witdh: indentation of the result value to conform to YAML
1816
19- Example:
17+ Example (based on a `tplroot` of `xxx`) :
2018
2119 If we have a state:
2220
2321 Deploy configuration:
2422 file.managed:
2523 - name: /etc/yyy/zzz.conf
26- - source: {{ files_switch('xxx', ['/etc/yyy/zzz.conf',
27- '/etc/yyy/zzz.conf.jinja']) }}
24+ - source: {{ files_switch(
25+ salt['config.get'](
26+ tplroot ~ ':tofs:files:Deploy configuration',
27+ ['/etc/yyy/zzz.conf', '/etc/yyy/zzz.conf.jinja']
28+ )
29+ ) }}
2830 - template: jinja
2931
3032 In a minion with id=theminion and os_family=RedHat, it's going to be
You can’t perform that action at this time.
0 commit comments