diff --git a/g b/g new file mode 100644 index 0000000..674dd40 Binary files /dev/null and b/g differ diff --git a/scripts/install_vagrant.sh b/scripts/install_vagrant.sh new file mode 100644 index 0000000..08cc847 --- /dev/null +++ b/scripts/install_vagrant.sh @@ -0,0 +1,3 @@ +wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg && +echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list && +sudo apt-get update && sudo apt install vagrant \ No newline at end of file diff --git a/scripts/install_virtual_box.sh b/scripts/install_virtual_box.sh new file mode 100644 index 0000000..cce11e8 --- /dev/null +++ b/scripts/install_virtual_box.sh @@ -0,0 +1 @@ +sudo apt-get install virtualbox \ No newline at end of file diff --git a/start.sh b/start.sh index 8fa6d7f..40828d7 100755 --- a/start.sh +++ b/start.sh @@ -4,7 +4,7 @@ set -e function usage(){ - cat < @@ -85,9 +85,22 @@ else fi ## install required collections +#!/bin/bash + +# Check if Vagrant is installed +if command -v vagrant &> /dev/null +then + echo "Vagrant is installed" + vagrant --version +else + sh scripts/install_vagrant.sh +fi +#install virtualbox +sh scripts/install_virtual_box.sh + ansible-galaxy collection install -r requirements.yml -## provision the server +# provision the server if [ -z "$STACK_SERVER"]; then lint_vagrant vagrant up