Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ansible CI
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KSZK
Ansible
Ansible CI
Commits
86cfd83b
Commit
86cfd83b
authored
4 years ago
by
Robotka István Adrián
Browse files
Options
Downloads
Patches
Plain Diff
adjust to new bootstrapper
parent
c024826a
No related branches found
No related tags found
No related merge requests found
Pipeline
#5809
passed
4 years ago
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
playbook-template/bootstrap.sh
+8
-26
8 additions, 26 deletions
playbook-template/bootstrap.sh
with
8 additions
and
26 deletions
playbook-template/bootstrap.sh
+
8
−
26
View file @
86cfd83b
#!/usr/bin/env bash
#!/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 ####################################
########################### Virtualenv setup ####################################
downloadFi
le
"
requirements.python.txt
"
echo
ansib
le
>
requirements.python.txt
# check existance of virtualenv command
# check existance of virtualenv command
if
!
command
-v
virtualenv &>/dev/null
;
then
if
!
command
-v
virtualenv &>/dev/null
;
then
...
@@ -33,14 +13,16 @@ if ! command -v virtualenv &>/dev/null; then
...
@@ -33,14 +13,16 @@ if ! command -v virtualenv &>/dev/null; then
exit
1
exit
1
fi
fi
# if not in virtualenv
if
[[
"
$VIRTUAL_ENV
"
==
""
]]
;
then
# create virtualenv if not present
# create virtualenv if not present
[[
!
-d
.venv
]]
&&
virtualenv .venv
[[
!
-d
.venv
]]
&&
virtualenv .venv
source
.venv/bin/activate
source
.venv/bin/activate
pip
install
-r
requirements.python.txt
pip
install
-r
requirements.python.txt
fi
########################### Ansible setup ####################################
########################### Ansible setup ####################################
ansible-galaxy
install
-r
requirements.galaxy.yml
ansible-galaxy
install
-r
requirements.galaxy.yml
########################### Help to ${dummies:Mike} ####################################
########################### Help to ${dummies:Mike} ####################################
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment