From 162705c7ce7ab153a308f54a894d11ea8265380a Mon Sep 17 00:00:00 2001 From: Alexander Weidinger Date: Tue, 16 May 2017 12:28:22 +0200 Subject: [PATCH] Test config before applying it --- openssh/config.sls | 1 + openssh/defaults.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/openssh/config.sls b/openssh/config.sls index 08474db..93eb47c 100644 --- a/openssh/config.sls +++ b/openssh/config.sls @@ -12,6 +12,7 @@ sshd_config: - user: {{ openssh.sshd_config_user }} - group: {{ openssh.sshd_config_group }} - mode: {{ openssh.sshd_config_mode }} + - check_cmd: {{ openssh.sshd_binary }} -t -f - watch_in: - service: {{ openssh.service }} {% endif %} diff --git a/openssh/defaults.yaml b/openssh/defaults.yaml index b7993f4..021267e 100644 --- a/openssh/defaults.yaml +++ b/openssh/defaults.yaml @@ -1,5 +1,6 @@ openssh: sshd_enable: True + sshd_binary: /usr/sbin/sshd sshd_config: /etc/ssh/sshd_config sshd_config_src: salt://openssh/files/sshd_config sshd_config_user: root