mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2026-01-10 13:31:41 -07:00
main: flatten options
This commit is contained in:
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
|
||||||
|
|||||||
Reference in New Issue
Block a user