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.

21 lines
829B

  1. {% from "openssh/map.jinja" import mapdata with context %}
  2. {%- set openssh = mapdata.openssh %}
  3. {% set moduli = salt['pillar.get']('openssh:moduli', False) -%}
  4. {% set moduli_source = salt['pillar.get']('openssh:moduli_source', False) -%}
  5. {% if moduli or moduli_source -%}
  6. ssh_moduli:
  7. file.managed:
  8. - name: {{ openssh.ssh_moduli }}
  9. {% if moduli -%}
  10. # Although we have the contents of the moduli in the variable 'moduli',
  11. # inlining the variable here *will* cause problems. Using the '|' literal string indicator
  12. # Necessitates using the '|indent' filter, and this is too complex.
  13. # Rather, let salt read the pillar itself.
  14. - contents_pillar: openssh:moduli
  15. {% elif moduli_source -%}
  16. - source: {{ moduli_source }}
  17. - source_hash: {{ moduli_source|trim }}.hash
  18. {%- endif %}
  19. {% endif %}