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

24 行
746B

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