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
Ophélie Gagnard
slapos.package
Commits
3c4c9495
Commit
3c4c9495
authored
Nov 30, 2021
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ors and ors-upgrader playbooks
parent
2be17561
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
66 additions
and
0 deletions
+66
-0
playbook/ors-upgrade.yml
playbook/ors-upgrade.yml
+9
-0
playbook/ors.yml
playbook/ors.yml
+6
-0
playbook/roles/ors-upgrade/files/give-cap-sys-nice-lteenb
playbook/roles/ors-upgrade/files/give-cap-sys-nice-lteenb
+23
-0
playbook/roles/ors-upgrade/files/slapsoft-give-cap-sys-nice-lteenb
...roles/ors-upgrade/files/slapsoft-give-cap-sys-nice-lteenb
+1
-0
playbook/roles/ors-upgrade/tasks/main.yml
playbook/roles/ors-upgrade/tasks/main.yml
+21
-0
playbook/roles/ors/tasks/main.yml
playbook/roles/ors/tasks/main.yml
+3
-0
playbook/settings/ors-upgrade.yml
playbook/settings/ors-upgrade.yml
+3
-0
No files found.
playbook/ors-upgrade.yml
0 → 100644
View file @
3c4c9495
-
name
:
a play that runs entirely on the ansible host
hosts
:
127.0.0.1
connection
:
local
vars_files
:
-
settings/ors-upgrade.yml
roles
:
-
ors-upgrade
playbook/ors.yml
0 → 100644
View file @
3c4c9495
-
name
:
a play that runs entirely on the ansible host
hosts
:
127.0.0.1
connection
:
local
roles
:
-
ors
playbook/roles/ors-upgrade/files/give-cap-sys-nice-lteenb
0 → 100755
View file @
3c4c9495
#!/bin/bash
if
[
$#
-eq
0
]
;
then
echo
"Missing argument"
;
exit
1
;
fi
element-in
()
{
local
e
match
=
"
$1
"
;
shift
for
e
in
"
$@
"
;
do
[[
"
$e
"
==
"
$match
"
]]
&&
return
0
;
done
return
1
}
BINARY
=
$1
# List of hash for all supported lteenb / lteenb-avx2 binaries
SHA256_LIST
=(
\
"03e8641094b1909562dbf25678354ea09edb8109743cc3cdda43c4b423a36c07"
\
"09e5ff98bb6839e72d14728e9839fcbfb5873f786281b658a6c0d790ac1ff227"
\
)
element-in
$(
sha256sum
$BINARY
)
"
${
SHA256_LIST
[@]
}
"
||
{
echo
"
$1
sha256sum mismatch"
>
&2
;
exit
1
;
}
# relative RPATH gets ignored after capability has been set on binary
patchelf
--set-rpath
$(
dirname
$BINARY
)
$BINARY
;
setcap
cap_sys_nice
=
+pe
$BINARY
;
playbook/roles/ors-upgrade/files/slapsoft-give-cap-sys-nice-lteenb
0 → 100644
View file @
3c4c9495
slapsoft ALL=NOPASSWD:/opt/amarisoft/give-cap-sys-nice-lteenb
playbook/roles/ors-upgrade/tasks/main.yml
0 → 100644
View file @
3c4c9495
---
-
name
:
Get current LTE version
stat
:
path=/opt/amarisoft/lte
register
:
lte_version
-
name
:
Get hostname
shell
:
hostname
register
:
hostname
-
name
:
Check new LTE
debug
:
msg="New amarisoft LTE available"
when
:
lte_version.stat.lnk_target is not search(current_lte_version)
-
name
:
Check hostname
debug
:
var=hostname
-
name
:
Install give-cap-sys-nice-lteenb script
copy
:
src=give-cap-sys-nice-lteenb dest={{ install_folder }} owner=root mode=770
-
name
:
Give permission to slapsoft to execute give-cap-sys-nice-lteenb script
copy
:
src=slapsoft-give-cap-sys-nice-lteenb dest=/etc/sudoers.d owner=root mode=440
playbook/roles/ors/tasks/main.yml
0 → 100644
View file @
3c4c9495
---
-
name
:
Install upgrader
shell
:
ansible-playbook upgrader-run.yml --extra-vars "upgrader_playbook=ors-upgrade.yml upgrade_kernel=False"
playbook/settings/ors-upgrade.yml
0 → 100644
View file @
3c4c9495
---
current_lte_version
:
"
2021-09-18"
install_folder
:
"
/opt/amarisoft"
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