Saltstack Official OpenSSH Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
1.1KB

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=jinja
  3. {## Start imports as ##}
  4. {% import_yaml 'openssh/defaults.yaml' as defaults %}
  5. {% import_yaml 'openssh/osfamilymap.yaml' as osfamilymap %}
  6. {% import_yaml 'openssh/osmap.yaml' as osmap %}
  7. {% import_yaml 'openssh/osfingermap.yaml' as osfingermap %}
  8. {## merge the osfamilymap ##}
  9. {% set osfamily = salt['grains.filter_by'](osfamilymap, grain='os_family') or {} %}
  10. {% do salt['defaults.merge'](defaults, osfamily) %}
  11. {## merge the osmap ##}
  12. {% set os = salt['grains.filter_by'](osmap, grain='os') or {} %}
  13. {% do salt['defaults.merge'](defaults, os) %}
  14. {## merge the osfingermap ##}
  15. {% set osfinger = salt['grains.filter_by'](osfingermap, grain='osfinger') or {} %}
  16. {% do salt['defaults.merge'](defaults, osfinger) %}
  17. {## merge the openssh pillar ##}
  18. {% set openssh = salt['pillar.get']('openssh', default=defaults['openssh'], merge=True) %}
  19. {% set ssh_config = salt['pillar.get']('ssh_config', default=defaults['ssh_config'], merge=True) %}
  20. {% set sshd_config = salt['pillar.get']('sshd_config', default=defaults['sshd_config'], merge=True) %}