0
0
mirror of https://github.com/saltstack-formulas/openssh-formula.git synced 2024-11-28 03:28:09 +01:00
openssh-formula/openssh/map.jinja
2019-02-12 19:02:57 +01:00

26 lines
1.1 KiB
Django/Jinja

# -*- coding: utf-8 -*-
# vim: ft=jinja
{## Start imports as ##}
{% import_yaml 'openssh/defaults.yaml' as defaults %}
{% import_yaml 'openssh/osfamilymap.yaml' as osfamilymap %}
{% import_yaml 'openssh/osmap.yaml' as osmap %}
{% import_yaml 'openssh/osfingermap.yaml' as osfingermap %}
{## merge the osfamilymap ##}
{% set osfamily = salt['grains.filter_by'](osfamilymap, grain='os_family') or {} %}
{% do salt['defaults.merge'](defaults, osfamily) %}
{## merge the osmap ##}
{% set os = salt['grains.filter_by'](osmap, grain='os') or {} %}
{% do salt['defaults.merge'](defaults, os) %}
{## merge the osfingermap ##}
{% set osfinger = salt['grains.filter_by'](osfingermap, grain='osfinger') or {} %}
{% do salt['defaults.merge'](defaults, osfinger) %}
{## merge the openssh pillar ##}
{% set openssh = salt['pillar.get']('openssh', default=defaults['openssh'], merge=True) %}
{% set ssh_config = salt['pillar.get']('ssh_config', default=defaults['ssh_config'], merge=True) %}
{% set sshd_config = salt['pillar.get']('sshd_config', default=defaults['sshd_config'], merge=True) %}