Explorar el Código

Specify config clause only if defined in pillar.

Signed-off-by: POTIER Mathieu <mathieu.potier@onzeway.eu>
master
POTIER Mathieu hace 9 años
padre
commit
f55445211c
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. +4
    -0
      openssh/auth.sls

+ 4
- 0
openssh/auth.sls Ver fichero

@@ -38,14 +38,18 @@ include:
{{ print_name(identifier, key) }}:
ssh_auth.present:
{{ print_ssh_auth(identifier, key) }}
{%- if 'sshd_config' in pillar and 'AuthorizedKeysFile' in pillar['sshd_config'] %}
- config: {{ pillar['sshd_config']['AuthorizedKeysFile'] }}
{% endif -%}
- require:
- service: {{ openssh.service }}
{%- else %}
{{ print_name(identifier, key) }}:
ssh_auth.absent:
{{ print_ssh_auth(identifier, key) }}
{%- if 'sshd_config' in pillar and 'AuthorizedKeysFile' in pillar['sshd_config'] %}
- config: {{ pillar['sshd_config']['AuthorizedKeysFile'] }}
{% endif -%}
{%- endif -%}
{%- endfor -%}
{%- endfor -%}

Cargando…
Cancelar
Guardar