Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(libsaltcli+libmatchers): update to ensure Salt client API detection #411

Merged
merged 1 commit into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ssf/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ ssf_node_anchors:
upstream: 'upstream'
commit:
# yamllint disable rule:line-length rule:quoted-strings
title: "ci(kitchen+gitlab): update for new pre-salted images [skip ci]"
body: '* Automated using https://github.com/myii/ssf-formula/pull/410'
title: "fix(libsaltcli+libmatchers): ensure Salt client API detection [skip ci]"
body: '* Automated using https://github.com/myii/ssf-formula/pull/411'
# yamllint enable rule:line-length rule:quoted-strings
github:
owner: 'saltstack-formulas'
Expand Down
6 changes: 3 additions & 3 deletions ssf/files/default/formula/libmatchers.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,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 @@ -190,8 +190,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 ssf/files/default/formula/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