-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(libsaltcli.jinja): manage file for
libvirt
& template
formulas
- Loading branch information
Showing
4 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# -*- 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 == 'salt-ssh' else 'local' %} | ||
{%- else %} | ||
{%- set cli = 'unknown' %} | ||
{%- endif %} | ||
{%- do salt['log.debug']('[libsaltcli] the salt command type has been identified to be: ' ~ cli) %} |
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