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
d6fee63d
Commit
d6fee63d
authored
8 years ago
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook: add some automations for imt slapos package installation
parent
bad07d05
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
0 deletions
+64
-0
playbook/imt-server.yml
playbook/imt-server.yml
+2
-0
playbook/roles/imt-slapos/tasks/main.yml
playbook/roles/imt-slapos/tasks/main.yml
+62
-0
No files found.
playbook/imt-server.yml
View file @
d6fee63d
...
...
@@ -17,5 +17,7 @@
default
:
"
notoken"
roles
:
-
{
role
:
imt-slapos
,
mount_directory
:
/virt
}
-
{
role
:
slapos
,
package_state
:
present
}
-
{
role
:
package
,
package_name
:
ntp
,
package_state
:
present
}
-
{
role
:
imt-slapos
,
post_config
:
True
}
This diff is collapsed.
Click to expand it.
playbook/roles/imt-slapos/tasks/main.yml
0 → 100644
View file @
d6fee63d
---
-
name
:
stat directory {{ mount_directory }}
stat
:
path={{ mount_directory }}
register
:
slapos_directory
when
:
mount_directory is defined
-
name
:
create slapos folders
shell
:
mkdir -p /opt/slapos /opt/slapgrid /srv/slapgrid
when
:
mount_directory is defined and slapos_directory.stat.exists == True
-
name
:
create slapos mount point folders
shell
:
mkdir -p {{ mount_directory }}/opt/slapos {{ mount_directory }}/opt/slapgrid {{ mount_directory }}/srv/slapgrid
when
:
mount_directory is defined and slapos_directory.stat.exists == True
-
name
:
mount srv/slapgrid directory
mount
:
name="{{ mount_directory }}/srv/slapgrid" src=/srv/slapgrid opts=bind state=mounted fstype=none
when
:
mount_directory is defined and slapos_directory.stat.exists == True
-
name
:
mount opt/slapgrid directory
mount
:
name="{{ mount_directory }}/opt/slapgrid" src=/opt/slapgrid opts=bind state=mounted fstype=none
when
:
mount_directory is defined and slapos_directory.stat.exists == True
-
name
:
mount srv/slapgrid directory
mount
:
name="{{ mount_directory }}/opt/slapos" src=/opt/slapos opts=bind state=mounted fstype=none
when
:
mount_directory is defined and slapos_directory.stat.exists == True
-
name
:
stat slapos.cfg file
stat
:
path=/etc/opt/slapos/slapos.cfg
register
:
slapos_cfg
when
:
post_config is defined
-
name
:
update slapos.cfg configuration
lineinfile
:
dest=/etc/opt/slapos/slapos.cfg regexp="{{ item.regexp }}" line="{{ item.line }}" backup=yes insertafter="^interface_name ="
with_items
:
-
{
regexp
:
'
^create_tap\s*='
,
line
:
'
create_tap
=
True'
}
-
{
regexp
:
'
^tap_gateway_interface\s*='
,
line
:
'
tap_gateway_interface
=
re6stnet-tcp'
}
-
{
regexp
:
'
^partition_amount\s*='
,
line
:
'
partition_amount
=
15'
}
when
:
post_config is defined and slapos_cfg.stat.exists == True
-
name
:
update slapos.cfg configuration storage/network
lineinfile
:
dest=/etc/opt/slapos/slapos.cfg regexp="{{ item.regexp }}" line="{{ item.line }}" backup=yes insertafter="^instance_root ="
with_items
:
-
{
regexp
:
'
^ipv4_global_network\s*='
,
line
:
'
ipv4_global_network
=
10.32.0.0/13'
}
-
{
regexp
:
'
^instance_storage_home\s*='
,
line
:
'
instance_storage_home
=
/data'
}
when
:
post_config is defined and slapos_cfg.stat.exists == True
-
modprobe
:
name=kvm state=present
when
:
post_config is defined
-
modprobe
:
name=kvm_intel state=present
when
:
post_config is defined
-
modprobe
:
name=vhost-net state=present
when
:
post_config is defined
-
file
:
path=/dev/kvm mode=0666
when
:
post_config is defined
-
file
:
path=/dev/vhost-net mode=0666
when
:
post_config is defined
-
name
:
Run slapos format for update configs
shell
:
"
slapos
node
format
-v
--now"
when
:
post_config is defined and slapos_cfg.stat.exists == True
This diff is collapsed.
Click to expand it.
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