Saltstack Official OpenSSH Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
660B

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=jinja
  3. {#- Get the relevant values from the `opts` dict #}
  4. {%- set opts_cli = opts.get('__cli', '') %}
  5. {%- set opts_masteropts_cli = opts | traverse('__master_opts__:__cli', '') %}
  6. {#- Determine the type of salt command being run #}
  7. {%- if opts_cli == 'salt-minion' %}
  8. {%- set cli = 'minion' %}
  9. {%- elif opts_cli == 'salt-call' %}
  10. {%- set cli = 'ssh' if opts_masteropts_cli in ('salt-ssh', 'salt-master') else 'local' %}
  11. {%- elif opts_cli %}
  12. {%- set cli = 'api' %}
  13. {%- else %}
  14. {%- set cli = 'unknown' %}
  15. {%- endif %}
  16. {%- do salt['log.debug']('[libsaltcli] the salt command type has been identified to be: ' ~ cli) %}