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
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.package
Commits
cf982bf0
Commit
cf982bf0
authored
Apr 10, 2024
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook/ors: add get-license-info
parent
01305f64
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
1 deletion
+34
-1
playbook/roles/ors/files/get-license-info
playbook/roles/ors/files/get-license-info
+30
-0
playbook/roles/ors/tasks/main.yml
playbook/roles/ors/tasks/main.yml
+3
-0
playbook/sha256sum
playbook/sha256sum
+1
-1
No files found.
playbook/roles/ors/files/get-license-info
0 → 100755
View file @
cf982bf0
#!/usr/bin/env python3
import
argparse
,
os
,
re
,
sys
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'-e'
,
'--expiration'
,
action
=
'store_true'
)
parser
.
add_argument
(
'-v'
,
'--version'
,
action
=
'store_true'
)
args
=
parser
.
parse_args
()
amarisoft_dir
=
'/opt/amarisoft'
try
:
lte_version
=
sorted
(
filter
(
lambda
x
:
re
.
match
(
r"v[0-9]{4}-[0-9]{2}-[0-9]{2}"
,
x
),
os
.
listdir
(
amarisoft_dir
)))[
-
1
][
1
:]
except
FileNotFoundError
:
lte_version
=
'Unknown'
lte_expiration
=
"Unknown"
try
:
for
filename
in
os
.
listdir
(
amarisoft_dir
+
'/.amarisoft'
):
if
filename
.
endswith
(
'.key'
):
with
open
(
os
.
path
.
join
(
amarisoft_dir
+
'/.amarisoft'
,
filename
),
'r'
)
as
f
:
f
.
seek
(
260
)
for
l
in
f
:
if
l
.
startswith
(
'version='
):
lte_expiration
=
l
.
split
(
'='
)[
1
].
strip
()
except
FileNotFoundError
:
pass
if
args
.
expiration
:
print
(
lte_expiration
,
end
=
''
)
elif
args
.
version
:
print
(
lte_version
,
end
=
''
)
playbook/roles/ors/tasks/main.yml
View file @
cf982bf0
...
@@ -64,6 +64,9 @@
...
@@ -64,6 +64,9 @@
-
name
:
Copy get-sdr-info script
-
name
:
Copy get-sdr-info script
copy
:
src=get-sdr-info dest=/opt/amarisoft owner=root mode=770
copy
:
src=get-sdr-info dest=/opt/amarisoft owner=root mode=770
-
name
:
Copy get-license-info script
copy
:
src=get-license-info dest=/opt/amarisoft owner=root mode=770
# Re6st
# Re6st
-
name
:
Configure re6st
-
name
:
Configure re6st
...
...
playbook/sha256sum
View file @
cf982bf0
087f0c7a760654c2411c91c39d56a86ec2e8e3147a0076945b3152a86b3701b1
-
a0c509f6bba4a62a2dbefe8e79b32f05ef4026e7e763bae5ec6db5d1e173a723
-
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