Permalink
Cannot retrieve contributors at this time
18 lines (16 sloc)
670 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
template-formula/TEMPLATE/libsaltcli.jinja
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{#- -*- coding: utf-8 -*- #} | |
{#- vim: ft=jinja #} | |
{#- Get the relevant values from the `opts` dict #} | |
{%- set opts_cli = opts.get('__cli', '') %} | |
{%- set opts_masteropts_cli = opts | traverse('__master_opts__:__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 opts_masteropts_cli in ('salt-ssh', 'salt-master') 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) %} |