From b3f70e3bf441cac0c5cc049887e5119ae90c2165 Mon Sep 17 00:00:00 2001 From: Goetz Salzmann Date: Mon, 9 Oct 2017 10:20:53 +0200 Subject: [PATCH] force /bin/sh when getting openssh-version (since the update to ansible 2.4.0.0) the C shell is used on FreeBSD to run shell tasks. This breakes the redirect. Forcing /bin/sh fixes this. --- tasks/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index 0e007ff97..8c53107e9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -9,6 +9,8 @@ - name: get openssh-version shell: ssh -V 2>&1 | sed -r 's/.*_([0-9]*\.[0-9]).*/\1/g' + args: + executable: /bin/sh changed_when: false register: sshd_version check_mode: no