From ea3b17ef2d9be9217868cc0b364162008214118d Mon Sep 17 00:00:00 2001 From: Mark Janssen -- Sig-I/O Automatisering Date: Sun, 14 Jul 2024 20:21:56 +0200 Subject: [PATCH] Add validate to ssh config change --- roles/bank/tasks/login.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/bank/tasks/login.yaml b/roles/bank/tasks/login.yaml index cd0f9ba..7ed568e 100644 --- a/roles/bank/tasks/login.yaml +++ b/roles/bank/tasks/login.yaml @@ -11,6 +11,7 @@ ansible.builtin.blockinfile: path: /etc/ssh/sshd_config insertafter: EOF + validate: "/usr/sbin/sshd -t -f %s" block: |- Match User bank PasswordAuthentication yes