From 038a51cdc85fe4507eb943bfb16c189538cc144b Mon Sep 17 00:00:00 2001 From: ek9 Date: Fri, 24 Feb 2017 21:13:52 +0100 Subject: [PATCH] manage sshd_config and ssh_config only if pillars are defined --- openssh/config.sls | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openssh/config.sls b/openssh/config.sls index e462888..3070603 100644 --- a/openssh/config.sls +++ b/openssh/config.sls @@ -3,6 +3,7 @@ include: - openssh +{% if salt['pillar.get']('sshd_config', False) %} sshd_config: file.managed: - name: {{ openssh.sshd_config }} @@ -12,7 +13,9 @@ sshd_config: - mode: 644 - watch_in: - service: openssh +{% endif %} +{% if salt['pillar.get']('ssh_config', False) %} ssh_config: file.managed: - name: {{ openssh.ssh_config }} @@ -20,6 +23,7 @@ ssh_config: - template: jinja - user: root - mode: 644 +{% endif %} {% for keyType in ['ecdsa', 'dsa', 'rsa', 'ed25519'] %} {% if salt['pillar.get']('openssh:generate_' ~ keyType ~ '_keys', False) %}