Skip to content
Snippets Groups Projects
Commit 86cfd83b authored by Robotka István Adrián's avatar Robotka István Adrián
Browse files

adjust to new bootstrapper

parent c024826a
No related branches found
No related tags found
No related merge requests found
Pipeline #5809 passed
#!/usr/bin/env bash
########################### Config ####################################
reporaw="https://git.sch.bme.hu/kszk/sysadmin/ansible/ansci/-/raw/master/playbook-template"
########################### Methods ####################################
download() {
local url="$1"
local dest="$2"
if command -v wget &>/dev/null; then
wget "$url" -O "$dest"
else
curl "$url" -O "$dest"
fi
}
downloadFile() {
download "$reporaw/$1" "$1"
}
########################### Virtualenv setup ####################################
downloadFile "requirements.python.txt"
echo ansible > requirements.python.txt
# check existance of virtualenv command
if ! command -v virtualenv &>/dev/null; then
......@@ -33,14 +13,16 @@ if ! command -v virtualenv &>/dev/null; then
exit 1
fi
# if not in virtualenv
if [[ "$VIRTUAL_ENV" == "" ]]; then
# create virtualenv if not present
[[ ! -d .venv ]] && virtualenv .venv
source .venv/bin/activate
pip install -r requirements.python.txt
fi
########################### Ansible setup ####################################
ansible-galaxy install -r requirements.galaxy.yml
########################### Help to ${dummies:Mike} ####################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment