From 76078f2b18dd02b084055aa9746a8fdde55553a2 Mon Sep 17 00:00:00 2001 From: Brandon McNama Date: Thu, 5 Nov 2020 15:33:34 -0500 Subject: [PATCH] Make command compatible with ZSH This change makes the commands run by the provisioner compatible with ZSH. This change fixes compatibility with targets where ZSH is the default shell. Fixes neillturner/kitchen-ansible#308 --- lib/kitchen/provisioner/ansible_playbook.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kitchen/provisioner/ansible_playbook.rb b/lib/kitchen/provisioner/ansible_playbook.rb index d3e185e..393bd7a 100644 --- a/lib/kitchen/provisioner/ansible_playbook.rb +++ b/lib/kitchen/provisioner/ansible_playbook.rb @@ -311,7 +311,7 @@ def prepare_command commands = [] commands << [ - "if [ $(uname -s) == 'FreeBSD' ]; then ETC_ANSIBLE='/usr/local/etc/ansible'; else ETC_ANSIBLE='/etc/ansible'; fi" + "if [ $(uname -s) = 'FreeBSD' ]; then ETC_ANSIBLE='/usr/local/etc/ansible'; else ETC_ANSIBLE='/etc/ansible'; fi" ] # Prevent failure when ansible package installation doesn't contain /etc/ansible commands << [