Skip to content

Commit

Permalink
fix(libsaltcli+libmatchers): ensure Salt client API detection [skip ci]
Browse files Browse the repository at this point in the history
* Automated using myii/ssf-formula#411
  • Loading branch information
baby-gnu authored and myii committed Feb 4, 2022
1 parent e6af371 commit 3622ad2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cert/libmatchers.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
{%- endif %}

{#- Add `merge:` option to `salt["config.get"]` if configured #}
{%- if cli in ["minion", "local"] and parsed.query_method == "config.get" and config_get_strategy %}
{%- if cli not in ["ssh", "unknown"] and parsed.query_method == "config.get" and config_get_strategy %}
{%- set query_opts = {
"merge": config_get_strategy,
"delimiter": parsed.query_delimiter,
Expand All @@ -184,8 +184,8 @@
~ "'"
) %}
{%- else %}
{%- if cli not in ["minion", "local"] %}
{%- do salt["log.error"](
{%- 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
Expand Down
2 changes: 2 additions & 0 deletions cert/libsaltcli.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
{%- set cli = 'minion' %}
{%- elif opts_cli == 'salt-call' %}
{%- set cli = 'ssh' if opts_masteropts_cli in ('salt-ssh', 'salt-master') else 'local' %}
{%- elif opts_cli %}
{%- set cli = 'api' %}
{%- else %}
{%- set cli = 'unknown' %}
{%- endif %}
Expand Down

0 comments on commit 3622ad2

Please # to comment.