Saltstack Official OpenSSH Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

26 行
793B

  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. {%- if openssh.dig_pkg %}
  6. ensure dig is available:
  7. pkg.installed:
  8. - name: {{ openssh.dig_pkg }}
  9. - require_in:
  10. - file: manage ssh_known_hosts file
  11. {%- endif %}
  12. manage ssh_known_hosts file:
  13. file.managed:
  14. - name: {{ openssh.ssh_known_hosts }}
  15. - source: {{ files_switch( [openssh.ssh_known_hosts_src],
  16. 'manage ssh_known_hosts file'
  17. ) }}
  18. - template: jinja
  19. - context:
  20. known_hosts: {{ openssh | traverse("known_hosts", {}) | json }}
  21. - user: root
  22. - group: {{ openssh.ssh_config_group }}
  23. - mode: 644