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.

20 lines
792B

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