17 lines
538 B
Django/Jinja
17 lines
538 B
Django/Jinja
{#- vim: ft=jinja #}
|
|
|
|
{#- Get the relevant values from the `opts` dict #}
|
|
{%- set opts_cli = opts.get('__cli', '') %}
|
|
|
|
{#- Determine the type of salt command being run #}
|
|
{%- if opts_cli == 'salt-minion' %}
|
|
{%- set cli = 'minion' %}
|
|
{%- elif opts_cli == 'salt-call' %}
|
|
{%- set cli = 'ssh' if "__master_opts__" in opts else 'local' %}
|
|
{%- elif opts_cli %}
|
|
{%- set cli = 'api' %}
|
|
{%- else %}
|
|
{%- set cli = 'unknown' %}
|
|
{%- endif %}
|
|
{%- do salt['log.debug']('[libsaltcli] the salt command type has been identified to be: ' ~ cli) %}
|