-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(test/salt/pillar/top.sls): manage across formulas
- Loading branch information
Showing
6 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=yaml | ||
--- | ||
{#- Centralise duplication from here and `kitchen.yml` #} | ||
{%- macro format_matcher(matcher_parent, width=10) %} | ||
{%- filter indent(width) %} | ||
{%- for mp in matcher_parent %} | ||
{%- for matcher, matcher_specs in mp.items() %} | ||
'{{ matcher }}': | ||
{%- for matcher_child in matcher_specs %} | ||
{%- if matcher_child == '.' %} | ||
{%- set matcher_child = semrel_formula %} | ||
{%- elif matcher_child.startswith('.') %} | ||
{%- set matcher_child = semrel_formula ~ matcher_child %} | ||
{%- endif %} | ||
{#- To allow comments interspersed the list, use `list_format` accordingly #} | ||
{%- set list_format = '- ' %} | ||
{%- if matcher_child.startswith('#') %} | ||
{%- set list_format = '' %} | ||
{%- endif %} | ||
{{ list_format }}{{ matcher_child }} | ||
{%- endfor %} | ||
{%- endfor %} | ||
{%- endfor %} | ||
{%- endfilter %} | ||
{%- endmacro %} | ||
base: | ||
{{- format_matcher(kitchen.provisioner.top_sls, width=2) }} | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters