mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2024-12-23 04:37:29 +00:00
main: flatten options
This commit is contained in:
parent
594eddd07c
commit
b898645779
1 changed files with 5 additions and 1 deletions
6
main.sh
6
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
|
||||
|
|
Loading…
Reference in a new issue