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
Romain Courteaud
slapos.package
Commits
5261ad04
Commit
5261ad04
authored
Sep 16, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook: configuration of rina with re6stnet
parent
23f0eef9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
0 deletions
+91
-0
playbook/rina.yml
playbook/rina.yml
+19
-0
playbook/roles/rina/gen-ipcm-conf
playbook/roles/rina/gen-ipcm-conf
+67
-0
playbook/roles/rina/tasks/main.yml
playbook/roles/rina/tasks/main.yml
+5
-0
No files found.
playbook/rina.yml
0 → 100644
View file @
5261ad04
-
name
:
a play that runs entirely on the ansible host
hosts
:
127.0.0.1
connection
:
local
vars_files
:
-
settings/vifib.yml
vars
:
-
re6sttoken
:
noname
vars_prompt
:
-
name
:
"
computer_name"
prompt
:
"
Please
insert
your
email
or
a
name
of
this
computer:"
private
:
no
default
:
"
noname"
roles
:
-
{
role
:
re6stnet
,
package_state
:
present
}
-
rina
playbook/roles/rina/gen-ipcm-conf
0 → 100755
View file @
5261ad04
#!/usr/bin/python
import
errno
,
json
,
os
with
open
(
"/etc/ipcmanager.conf"
)
as
f
:
conf
=
json
.
load
(
f
)
conf
[
"difConfigurations"
][:]
=
(
{
"name"
:
"shim"
,
"template"
:
"shim-tcp-udp.dif"
,
},
)
conf
[
"ipcProcessesToCreate"
][:]
=
(
{
"apInstance"
:
"1"
,
"apName"
:
"re6st"
,
"difName"
:
"shim"
,
"type"
:
"shim-tcp-udp"
,
},
)
with
open
(
"/etc/default.dif"
)
as
f
:
default
=
json
.
load
(
f
)
del
default
[
"knownIPCProcessAddresses"
][:]
d
=
"/etc/ipcm-re6st"
os
.
path
.
isdir
(
d
)
or
os
.
makedirs
(
d
)
os
.
chdir
(
d
)
def
write
(
path
,
text
):
try
:
with
open
(
path
,
"r"
)
as
f
:
if
f
.
read
()
==
text
:
return
except
IOError
as
e
:
if
e
.
errno
!=
errno
.
ENOENT
:
raise
with
open
(
path
,
"w"
)
as
f
:
f
.
write
(
text
)
def
write_json
(
path
,
obj
):
write
(
path
,
json
.
dumps
(
obj
,
indent
=
2
,
sort_keys
=
True
))
write_json
(
"ipcmanager.conf"
,
conf
)
write_json
(
"da.map"
,
{})
write_json
(
"default.dif"
,
default
)
write_json
(
"shim-tcp-udp.dif"
,
{
"difType"
:
"shim-tcp-udp"
})
write
(
"/etc/modules-load.d/rina.conf"
,
"""
\
#shim-eth-vlan
shim-tcp-udp
rina-default-plugin
"""
)
write
(
"/etc/systemd/system/ipcm-re6st.service"
,
"""
\
[Unit]
Description=RINA IPC Manager
ConditionPathExists=/sys/rina
[Service]
ExecStart=/usr/bin/ipcm -c %s/ipcmanager.conf
Restart=on-failure
[Install]
WantedBy=multi-user.target
"""
%
d
)
playbook/roles/rina/tasks/main.yml
View file @
5261ad04
...
...
@@ -2,3 +2,8 @@
#- include: "{{ ansible_distribution |lower }}.yml"
-
assert
:
{
that
:
"
ansible_distribution
==
'Debian'"
}
-
include
:
debian.yml
#- command: "{{role_path}}/gen-ipcm-conf"
-
command
:
roles/rina/gen-ipcm-conf
-
service
:
name=ipcm-re6st enabled=yes
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