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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KSZK
Ansible
Ansible CI
Commits
cf322be6
Commit
cf322be6
authored
4 years ago
by
Robotka István Adrián
Browse files
Options
Downloads
Patches
Plain Diff
update bootstrapper
parent
8cbf2095
No related branches found
No related tags found
No related merge requests found
Pipeline
#8098
failed
4 years ago
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
playbook-template/bootstrap.sh
+20
-23
20 additions, 23 deletions
playbook-template/bootstrap.sh
with
20 additions
and
23 deletions
playbook-template/bootstrap.sh
+
20
−
23
View file @
cf322be6
...
@@ -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
"
\t
apt install python3-venv
\n
"
printf
"
\t
OR pip3 install --user virtualenv
\n
"
printf
"
\t
export 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
"
R
un playbook with:"
echo
"
You can r
un playbook with:"
printf
"
\t
ansible-playbook -i inventory.yaml
what_is
.yml"
printf
"
\t
ansible-playbook -i inventory.yaml
your-playbook
.y
a
ml"
echo
echo
# to stay in our comfy virtualenv
# to stay in our comfy virtualenv
...
...
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