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.

22 lines
697B

  1. {%- set tplroot = tpldir.split('/')[0] %}
  2. {%- from tplroot ~ "/map.jinja" import mapdata with context %}
  3. {%- from tplroot ~ "/libtofs.jinja" import files_switch %}
  4. {%- set openssh = mapdata.openssh %}
  5. include:
  6. - openssh
  7. sshd_banner:
  8. file.managed:
  9. - name: {{ openssh.banner }}
  10. {%- if openssh.banner_string is defined %}
  11. - contents: {{ openssh.banner_string | yaml }}
  12. {%- else %}
  13. {#- Preserve backward compatibility using the `if` below #}
  14. - source: {{ openssh.banner_src if '://' in openssh.banner_src
  15. else files_switch( [openssh.banner_src],
  16. 'sshd_banner'
  17. ) }}
  18. - template: jinja
  19. {%- endif %}