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

update bootstrapper

parent 8cbf2095
No related branches found
No related tags found
No related merge requests found
Pipeline #8098 failed
...@@ -2,35 +2,32 @@ ...@@ -2,35 +2,32 @@
########################### Virtualenv setup #################################### ########################### Virtualenv setup ####################################
echo ansible > requirements.python.txt
# check existance of virtualenv command
if ! command -v virtualenv &>/dev/null; then
echo "This command needs virtualenv to run."
echo "Install it like this:"
printf "\tapt install python3-venv\n"
printf "\tOR pip3 install --user virtualenv\n"
printf "\texport PATH=\"~/.local/bin:\$PATH\"\n"
exit 1
fi
# if not in virtualenv
if [[ "$VIRTUAL_ENV" == "" ]]; then
# create virtualenv if not present # create virtualenv if not present
[[ ! -d .venv ]] && python3 -m venv .venv [[ ! -d .venv ]] && python3 -m venv .venv
source .venv/bin/activate source .venv/bin/activate
pip install -r requirements.python.txt
fi pip3 install ansible
########################### Ansible setup #################################### ########################### Ansible setup ####################################
ansible-galaxy install -r requirements.galaxy.yml ansible-galaxy install -r requirements.galaxy.yml
########################### Help to ${dummies:Mike} #################################### ########################### Help ####################################
echo
echo "########################################"
echo
echo "Your playbooks:"
find . -maxdepth 1 -type f -name "*.yaml" | grep -v inventory
echo
echo "Recommendation: Set up your OpenSSH config based on inventory.yml"
echo echo
echo "Run playbook with:" echo "You can run playbook with:"
printf "\tansible-playbook -i inventory.yaml what_is.yml" printf "\tansible-playbook -i inventory.yaml your-playbook.yaml"
echo echo
# to stay in our comfy virtualenv # to stay in our comfy virtualenv
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment