1
0
Fork 0
mirror of https://github.com/dawidd6/action-ansible-playbook.git synced 2024-11-22 07:26:25 +00:00

main: flatten options

This commit is contained in:
Dawid Dziurla 2020-04-07 00:01:30 +02:00 committed by GitHub
parent 594eddd07c
commit b898645779
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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