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
Lu Xu
slapos.package
Commits
626fd7c7
Commit
626fd7c7
authored
Mar 21, 2019
by
Alain Takoudjou
Committed by
Thomas Gambier
Mar 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook: Add imt server statup playbook
parent
f37ecd6b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
playbook/imt-startup.yml
playbook/imt-startup.yml
+8
-0
playbook/roles/imt-slapos/tasks/main.yml
playbook/roles/imt-slapos/tasks/main.yml
+15
-0
No files found.
playbook/imt-startup.yml
0 → 100644
View file @
626fd7c7
-
name
:
a play that runs entirely on the ansible host
hosts
:
127.0.0.1
connection
:
local
vars_files
:
-
settings/imt.yml
roles
:
-
{
role
:
imt-slapos
,
post_config
:
True
}
\ No newline at end of file
playbook/roles/imt-slapos/tasks/main.yml
View file @
626fd7c7
---
-
file
:
path=/opt/upgrader state=directory mode=0755
-
name
:
stat directory {{ mount_directory }}
stat
:
path={{ mount_directory }}
...
...
@@ -25,6 +26,20 @@
mount
:
src="{{ mount_directory }}/opt/slapos" name=/opt/slapos opts=bind state=mounted fstype=none
when
:
mount_directory is defined and slapos_directory.stat.exists == True
-
stat
:
path=/opt/upgrader/playbook
register
:
playbook
-
name
:
Download the playbook
shell
:
/usr/local/bin/slapcache-download --destination=/opt/upgrader/archive.tar.gz
when
:
playbook.stat.exists == False
-
name
:
Copy slapos.playbook
unarchive
:
src=/opt/upgrader/archive.tar.gz dest=/opt/upgrader/playbook
when
:
playbook.stat.exists == False
-
name
:
Set Startup Cron
cron
:
name="Launch Startup with ansible" special_time=reboot job='cd /opt/upgrader/playbook && ansible-playbook imt-startup.yml -i hosts 2>>/opt/upgrader/startup.log >> /opt/upgrader/startup.log'
-
name
:
stat slapos.cfg file
stat
:
path=/etc/opt/slapos/slapos.cfg
register
:
slapos_cfg
...
...
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