# -*- 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) %}