mirror of
https://github.com/saltstack-formulas/openssh-formula.git
synced 2024-12-01 00:25:31 +01:00
df477b25c2
The `map.jinja` now exports a single variable called `mapdata`. We extract the `openssh`, `sshd_config` and `ssh_config` from it to minimize the changes to `.sls` files.
17 lines
614 B
Django/Jinja
17 lines
614 B
Django/Jinja
# -*- 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' %}
|
|
{%- else %}
|
|
{%- set cli = 'unknown' %}
|
|
{%- endif %}
|
|
{%- do salt['log.debug']('[libsaltcli] the salt command type has been identified to be: ' ~ cli) %}
|