Skip to content

Commit

Permalink
style(mapstack): variables in macro can't be exported
Browse files Browse the repository at this point in the history
No need to prefix some of them with underscore `_`.
  • Loading branch information
baby-gnu committed Jan 11, 2021
1 parent ff6b56c commit 7de2d6f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions openssh/libmapstack.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
{#- 1. the `value` #}
{#- 2. the `defaults` #}
{#- 3. the built-in #}
{%- set _strategy = matcher.value
{%- set strategy = matcher.value
| traverse(
"strategy",
defaults
Expand All @@ -123,7 +123,7 @@
"smart"
)
) %}
{%- set _merge_lists = matcher.value
{%- set merge_lists = matcher.value
| traverse(
"merge_lists",
defaults
Expand Down Expand Up @@ -156,9 +156,9 @@
~ "' retrieved with '"
~ matcher.query_method
~ "', merge: strategy='"
~ _strategy
~ strategy
~ "', lists='"
~ _merge_lists
~ merge_lists
~ "':\n"
~ value
| yaml(False)
Expand All @@ -169,8 +169,8 @@
"values": salt["slsutil.merge"](
stack["values"],
value,
strategy=_strategy,
merge_lists=_merge_lists,
strategy=strategy,
merge_lists=merge_lists,
)
}
) %}
Expand Down Expand Up @@ -238,7 +238,7 @@
{#- 1. the `value` #}
{#- 2. the `defaults` #}
{#- 3. the built-in #}
{%- set _strategy = yaml_values
{%- set strategy = yaml_values
| traverse(
"strategy",
defaults
Expand All @@ -247,7 +247,7 @@
"smart"
)
) %}
{%- set _merge_lists = yaml_values
{%- set merge_lists = yaml_values
| traverse(
"merge_lists",
defaults
Expand All @@ -263,8 +263,8 @@
stack["values"],
yaml_values
| traverse("values", {}),
strategy=_strategy,
merge_lists=_merge_lists,
strategy=strategy,
merge_lists=merge_lists,
)
}
) %}
Expand All @@ -273,9 +273,9 @@
~ "merged configuration values from "
~ yaml_name
~ ", merge: strategy='"
~ _strategy
~ strategy
~ "', merge_lists='"
~ _merge_lists
~ merge_lists
~ "':\n"
~ {"values": stack["values"]}
| yaml(False)
Expand Down

0 comments on commit 7de2d6f

Please sign in to comment.