Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.package
Commits
6daccedc
Commit
6daccedc
authored
Oct 18, 2016
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook vm-bootstrap: on reboot quickly run the playbook to configure the computer
parent
390c995f
Pipeline
#2850
skipped
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
playbook/roles/vm-bootstrap/tasks/rerun.yml
playbook/roles/vm-bootstrap/tasks/rerun.yml
+1
-1
playbook/roles/vm-bootstrap/templates/start-script.j2
playbook/roles/vm-bootstrap/templates/start-script.j2
+5
-1
No files found.
playbook/roles/vm-bootstrap/tasks/rerun.yml
View file @
6daccedc
...
...
@@ -16,7 +16,7 @@
-
name
:
Add on reboot update on the VM
cron
:
name="reboot run vm bootstrap"
special_time=reboot
job="bash -lc /usr/local/bin/vm-bootstrap-update >> /var/log/vm-bootstrap.log"
job="
WAIT_TIME=10
bash -lc /usr/local/bin/vm-bootstrap-update >> /var/log/vm-bootstrap.log"
cron_file=ansible-vm-bootstrap user="root"
-
name
:
Check if /opt/slapos.playbook already exists
...
...
playbook/roles/vm-bootstrap/templates/start-script.j2
View file @
6daccedc
...
...
@@ -2,7 +2,11 @@
# Reruns the ansible playbook, does nothing else
cd
/opt/slapos.playbook
WAIT_TIME
=
$((
1
+
RANDOM
%
300
))
if
[
-z
"
$WAIT_TIME
"
]
;
then
WAIT_TIME
=
$((
1
+
RANDOM
%
300
))
;
fi
echo
"Sleeping for
$WAIT_TIME
seconds..."
sleep
$WAIT_TIME
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment