Skip to content

Commit 920f23c

Browse files
baby-gnumyii
authored andcommitted
fix(libsaltcli+libmatchers): ensure Salt client API detection [skip ci]
* Automated using myii/ssf-formula#411
1 parent ea87444 commit 920f23c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

openvpn/libmatchers.jinja

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
{%- endif %}
163163

164164
{#- Add `merge:` option to `salt["config.get"]` if configured #}
165-
{%- if cli in ["minion", "local"] and parsed.query_method == "config.get" and config_get_strategy %}
165+
{%- if cli not in ["ssh", "unknown"] and parsed.query_method == "config.get" and config_get_strategy %}
166166
{%- set query_opts = {
167167
"merge": config_get_strategy,
168168
"delimiter": parsed.query_delimiter,
@@ -175,8 +175,8 @@
175175
~ "'"
176176
) %}
177177
{%- else %}
178-
{%- if cli not in ["minion", "local"] %}
179-
{%- do salt["log.error"](
178+
{%- if cli in ["ssh", "unknown"] %}
179+
{%- do salt["log.warning"](
180180
log_prefix
181181
~ "the 'delimiter' and 'merge' options of 'config.get' are skipped when the salt command type is '"
182182
~ cli

openvpn/libsaltcli.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
{%- set cli = 'minion' %}
1111
{%- elif opts_cli == 'salt-call' %}
1212
{%- set cli = 'ssh' if opts_masteropts_cli in ('salt-ssh', 'salt-master') else 'local' %}
13+
{%- elif opts_cli %}
14+
{%- set cli = 'api' %}
1315
{%- else %}
1416
{%- set cli = 'unknown' %}
1517
{%- endif %}

0 commit comments

Comments
 (0)