fix: Update template

This commit is contained in:
jeanluc
2024-02-17 19:11:28 +01:00
parent 5f25a5a280
commit 6fd0bbdf3d
13 changed files with 293 additions and 270 deletions

View File

@@ -2,7 +2,6 @@
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split("/")[0] %}
{%- from tplroot ~ "/libsaltcli.jinja" import cli with context %}
{%- set query_map = {
"C": "config.get",
@@ -161,7 +160,7 @@
{%- endif %}
{#- Add `merge:` option to `salt["config.get"]` if configured #}
{%- if cli not in ["ssh", "unknown"] and parsed.query_method == "config.get" and config_get_strategy %}
{%- if parsed.query_method == "config.get" and config_get_strategy %}
{%- set query_opts = {
"merge": config_get_strategy,
"delimiter": parsed.query_delimiter,
@@ -174,14 +173,6 @@
~ "'"
) %}
{%- else %}
{%- if cli in ["ssh", "unknown"] %}
{%- do salt["log.warning"](
log_prefix
~ "the 'delimiter' and 'merge' options of 'config.get' are skipped when the salt command type is '"
~ cli
~ "'"
) %}
{%- endif %}
{%- set query_opts = {} %}
{%- set query_opts_msg = "" %}
{%- endif %}