From b898645779063c2b19b8367b8983dc3f21231ab9 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Tue, 7 Apr 2020 00:01:30 +0200 Subject: [PATCH] main: flatten options --- main.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.sh b/main.sh index 851b4af..dfa72bb 100755 --- a/main.sh +++ b/main.sh @@ -31,6 +31,10 @@ if test -n "$directory"; then cd "$directory" fi +if test -n "$options"; then + options="$(echo "$options" | tr '\n' ' ')" +fi + if test -n "$inventory"; then echo "==> Writing inventory with custom content:" echo -e "$inventory" | tee "$inventory_file" @@ -46,6 +50,6 @@ fi export ANSIBLE_HOST_KEY_CHECKING=False export ANSIBLE_FORCE_COLOR=True -echo "[command]ansible-playbook $options $playbook" | tr -d '\n' +echo "[command]ansible-playbook $options $playbook" ansible-playbook $options $playbook