Files
salt-gitea-formula/gitea/libsaltcli.jinja
2024-02-17 19:21:09 +01:00

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