瀏覽代碼

Merge pull request #204 from eole/fix/detect-python-client-api

fix(libmatchers): python client API can use `config.get` options
tags/v3.0.2
Imran Iqbal 2 年之前
父節點
當前提交
c9aaed93a3
沒有連結到貢獻者的電子郵件帳戶。
共有 2 個檔案被更改,包括 5 行新增3 行删除
  1. +3
    -3
      openssh/libmatchers.jinja
  2. +2
    -0
      openssh/libsaltcli.jinja

+ 3
- 3
openssh/libmatchers.jinja 查看文件

@@ -162,7 +162,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,
@@ -175,8 +175,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

+ 2
- 0
openssh/libsaltcli.jinja 查看文件

@@ -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 %}

Loading…
取消
儲存