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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.package
Commits
f8e23640
Commit
f8e23640
authored
Jul 17, 2015
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook: vm-bootstrap - re-run ansible setup periodically for adjust setup after changes.
parent
8f8c258a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
2 deletions
+38
-2
playbook/imt-vm-bootstrap.yml
playbook/imt-vm-bootstrap.yml
+1
-1
playbook/imt-vm-cloudera-manager.yml
playbook/imt-vm-cloudera-manager.yml
+1
-1
playbook/roles/vm-bootstrap/tasks/main.yml
playbook/roles/vm-bootstrap/tasks/main.yml
+1
-0
playbook/roles/vm-bootstrap/tasks/rerun.yml
playbook/roles/vm-bootstrap/tasks/rerun.yml
+29
-0
playbook/roles/vm-bootstrap/templates/start-script.j2
playbook/roles/vm-bootstrap/templates/start-script.j2
+6
-0
No files found.
playbook/imt-vm-bootstrap.yml
View file @
f8e23640
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
connection
:
local
connection
:
local
roles
:
roles
:
-
vm-bootstrap
-
{
role
:
vm-bootstrap
,
startup_playbook_id
:
imt-vm-bootstrap.yml
}
-
ntp
-
ntp
-
{
role
:
vm-disks
,
vd_disk
:
b
,
data_n
:
1
}
-
{
role
:
vm-disks
,
vd_disk
:
b
,
data_n
:
1
}
-
{
role
:
vm-disks
,
vd_disk
:
c
,
data_n
:
2
}
-
{
role
:
vm-disks
,
vd_disk
:
c
,
data_n
:
2
}
...
...
playbook/imt-vm-cloudera-manager.yml
View file @
f8e23640
...
@@ -3,6 +3,6 @@
...
@@ -3,6 +3,6 @@
connection
:
local
connection
:
local
roles
:
roles
:
-
vm-bootstrap
-
{
role
:
vm-bootstrap
,
startup_playbook_id
:
imt-vm-bootstrap.yml
}
-
ntp
-
ntp
-
vm-cloudera-manager
-
vm-cloudera-manager
playbook/roles/vm-bootstrap/tasks/main.yml
View file @
f8e23640
...
@@ -23,3 +23,4 @@
...
@@ -23,3 +23,4 @@
-
include
:
user.yml
-
include
:
user.yml
-
include
:
sudo.yml
-
include
:
sudo.yml
-
include
:
ssh.yml
-
include
:
ssh.yml
-
include
:
rerun.yml
playbook/roles/vm-bootstrap/tasks/rerun.yml
0 → 100644
View file @
f8e23640
---
-
name
:
Add startup script
template
:
src=start-script.j2 dest=/usr/local/bin/vm-bootstrap-update mode=755
-
name
:
Add a periodical update on the VM
cron
:
name="Update vm bootstrap"
minute="*/12"
job="/usr/local/bin/vm-bootstrap-update"
-
name
:
Check if /opt/slapos.playbook already exists
file
:
path=/opt/slapos.playbook/ state=directory
-
name
:
check if playbook is there
stat
:
path=/opt/slapos.playbook/playbook.tar.gz
register
:
playbook_archive
-
name
:
Download playbook
shell
:
slapcache-download --destination=playbook.tar.gz
when
:
playbook_archive.stat.exists == False
args
:
chdir
:
/opt/slapos.playbook
-
name
:
Copy slapos.playbook
shell
:
tar -xzvf /opt/slapos.playbook/playbook.tar.gz
when
:
playbook_archive.stat.exists == False
args
:
chdir
:
/opt/slapos.playbook
playbook/roles/vm-bootstrap/templates/start-script.j2
0 → 100644
View file @
f8e23640
#!/bin/bash
# Reruns the ansible playbook, does nothing else
cd
/opt/slapos.playbook
ansible-playbook
{{
startup_playbook_id
}}
-i
hosts
--connection
=
local
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