2015-07-01 22:42:48 +02:00
|
|
|
{% from "openssh/map.jinja" import openssh with context %}
|
|
|
|
|
2016-08-01 18:59:11 +02:00
|
|
|
{% set moduli = salt['pillar.get']('openssh:moduli', False) -%}
|
|
|
|
{% set moduli_source = salt['pillar.get']('openssh:moduli_source', False) -%}
|
|
|
|
{% if moduli or moduli_source -%}
|
2015-07-01 22:42:48 +02:00
|
|
|
ssh_moduli:
|
|
|
|
file.managed:
|
|
|
|
- name: {{ openssh.ssh_moduli }}
|
2016-08-01 18:59:11 +02:00
|
|
|
{% if moduli -%}
|
|
|
|
# Although we have the contents of the moduli in the variable 'moduli',
|
|
|
|
# inlining the variable here *will* cause problems. Using the '|' literal string indicator
|
|
|
|
# Necessitates using the '|indent' filter, and this is too complex.
|
|
|
|
# Rather, let salt read the pillar itself.
|
2015-07-01 22:42:48 +02:00
|
|
|
- contents_pillar: openssh:moduli
|
2016-08-01 18:59:11 +02:00
|
|
|
{% elif moduli_source -%}
|
|
|
|
- source: {{ moduli_source }}
|
|
|
|
- source_hash: {{ moduli_source|trim }}.hash
|
|
|
|
{%- endif %}
|
2015-07-01 22:42:48 +02:00
|
|
|
{% endif %}
|