diff options
Diffstat (limited to 'bootstrap_demo.sh')
-rwxr-xr-x | bootstrap_demo.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bootstrap_demo.sh b/bootstrap_demo.sh new file mode 100755 index 0000000..04655a4 --- /dev/null +++ b/bootstrap_demo.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +INVENTORY='inventory.yml' + +create_inv_ifnonex() { + cd ansible/ + if ! [ -e "$INVENTORY" ]; then + ln --symbolic "${INVENTORY}.sample" "$INVENTORY" + fi + cd "$OLDPWD" +} + +run_vagrant_env() { + cd vagrant/ + vagrant up + cd "$OLDPWD" +} + +main() { + create_inv_ifnonex + run_vagrant_env +} + +main |