mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2024-12-28 11:06:09 -07:00
main: flatten options
This commit is contained in:
parent
594eddd07c
commit
b898645779
6
main.sh
6
main.sh
|
@ -31,6 +31,10 @@ if test -n "$directory"; then
|
||||||
cd "$directory"
|
cd "$directory"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -n "$options"; then
|
||||||
|
options="$(echo "$options" | tr '\n' ' ')"
|
||||||
|
fi
|
||||||
|
|
||||||
if test -n "$inventory"; then
|
if test -n "$inventory"; then
|
||||||
echo "==> Writing inventory with custom content:"
|
echo "==> Writing inventory with custom content:"
|
||||||
echo -e "$inventory" | tee "$inventory_file"
|
echo -e "$inventory" | tee "$inventory_file"
|
||||||
|
@ -46,6 +50,6 @@ fi
|
||||||
export ANSIBLE_HOST_KEY_CHECKING=False
|
export ANSIBLE_HOST_KEY_CHECKING=False
|
||||||
export ANSIBLE_FORCE_COLOR=True
|
export ANSIBLE_FORCE_COLOR=True
|
||||||
|
|
||||||
echo "[command]ansible-playbook $options $playbook" | tr -d '\n'
|
echo "[command]ansible-playbook $options $playbook"
|
||||||
|
|
||||||
ansible-playbook $options $playbook
|
ansible-playbook $options $playbook
|
||||||
|
|
Loading…
Reference in New Issue
Block a user