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
Carlos Ramos Carreño
slapos.package
Commits
7ced67af
Commit
7ced67af
authored
Sep 11, 2023
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook/ors: reorganize tasks
parent
45054798
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
41 deletions
+57
-41
playbook/roles/ors/tasks/main.yml
playbook/roles/ors/tasks/main.yml
+56
-40
playbook/sha256sum
playbook/sha256sum
+1
-1
No files found.
playbook/roles/ors/tasks/main.yml
View file @
7ced67af
---
#
Delete ors-upgrade.yml cron which is replaced by ors.yml
#
Legacy
-
name
:
Remove obsolete cron
cron
:
name="Launch Upgrader with ansible" state=absent
...
...
@@ -17,8 +17,24 @@
-
name
:
Remove obsolete cron
cron
:
name="Launch ors playbook every 3 hours" state=absent
-
name
:
Enable and start cron.service
systemd
:
name=cron.service enabled=yes state=started
-
name
:
Check if Service Exists
stat
:
path=/etc/init.d/init-sdr
register
:
init_sdr_service
-
name
:
Reload daemon
systemd
:
daemon_reload=yes
when
:
init_sdr_service.stat.exists
-
name
:
Disable old init-sdr service
systemd
:
name=init-sdr enabled=no
when
:
init_sdr_service.stat.exists
# Radio Hardware
-
name
:
Copy get-sdr-info script
copy
:
src=get-sdr-info dest=/opt/amarisoft owner=root mode=770
# Amarisoft software
-
name
:
Create a directory if it does not exist
file
:
path=/opt/amarisoft state=directory mode=0755
...
...
@@ -32,21 +48,6 @@
-
name
:
Copy rm-tmp-lte script
copy
:
src=rm-tmp-lte dest=/opt/amarisoft owner=root mode=770
-
name
:
Copy get-sdr-info script
copy
:
src=get-sdr-info dest=/opt/amarisoft owner=root mode=770
-
name
:
Check if Service Exists
stat
:
path=/etc/init.d/init-sdr
register
:
init_sdr_service
-
name
:
Reload daemon
systemd
:
daemon_reload=yes
when
:
init_sdr_service.stat.exists
-
name
:
Disable old init-sdr service
systemd
:
name=init-sdr enabled=no
when
:
init_sdr_service.stat.exists
-
name
:
Get Amarisoft path
shell
:
'
find
/opt/amarisoft
-maxdepth
1
|
grep
"^/opt/amarisoft/v[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}$"
|
sort
|
tail
-n1'
register
:
amarisoft_path
...
...
@@ -69,39 +70,36 @@
shell
:
'
patchelf
--set-rpath
{{
amarisoft_path.stdout
}}/enb
{{
amarisoft_path.stdout
}}/enb/lteenb-avx2
&&
setcap
cap_sys_nice=+pe
{{
amarisoft_path.stdout
}}/enb/lteenb-avx2'
when
:
lteenb_avx2_cap.rc !=
0
-
name
:
C
onfigure re6st
script
:
configure-re6st
-
name
:
C
reate .amarisoft directory for SR
file
:
path=/opt/amarisoft/.amarisoft state=directory
-
name
:
Configure /etc/network/interfaces
copy
:
src=interfaces dest=/etc/network/interfaces owner=root mode=644
-
name
:
Copy keys for SR
copy
:
src=/root/.amarisoft dest=/opt/amarisoft owner=root mode=644
ignore_errors
:
yes
-
name
:
Configure
dhcp timeout
lineinfile
:
dest=/etc/dhcp/dhclient.conf regexp="^timeout (.*)" line="timeout 15" state=present
-
name
:
Configure
sudoers
script
:
configure-sudoers
-
name
:
Configure journald log size
lineinfile
:
dest=/etc/systemd/journald.conf regexp="^SystemMaxUse=(.*)" line="SystemMaxUse=1G" state=present
# Re6st
-
name
:
Configure
ssh
lineinfile
:
dest=/etc/ssh/sshd_config regexp="^PermitRootLogin (.*)" line="PermitRootLogin yes" state=presen
t
-
name
:
Configure
re6st
script
:
configure-re6s
t
-
name
:
Configure ssh
lineinfile
:
dest=/etc/ssh/sshd_config regexp="^PasswordAuthentication (.*)" line="PasswordAuthentication yes" state=present
# Slapos
-
name
:
Enable and start cron.service
systemd
:
name=cron.service enabled=yes state=started
-
name
:
Configure slapos
script
:
configure-slapos.py
-
name
:
Configure sudoers
script
:
configure-sudoers
# Network
-
name
:
Create .amarisoft directory for SR
file
:
path=/opt/amarisoft/.amarisoft state=directory
-
name
:
Copy keys for SR
copy
:
src=/root/.amarisoft dest=/opt/amarisoft owner=root mode=644
ignore_errors
:
yes
-
name
:
Configure /etc/network/interfaces
copy
:
src=interfaces dest=/etc/network/interfaces owner=root mode=644
-
name
:
Add kernel parameter
script
:
configure-grub
-
name
:
Configure dhcp timeout
lineinfile
:
dest=/etc/dhcp/dhclient.conf regexp="^timeout (.*)" line="timeout 15" state=present
-
name
:
Disable dnsmasq service
systemd
:
name=dnsmasq.service enabled=no state=stopped
...
...
@@ -149,6 +147,24 @@
source_port
:
5353
to_source
:
'
:53'
# System
-
name
:
Configure journald log size
lineinfile
:
dest=/etc/systemd/journald.conf regexp="^SystemMaxUse=(.*)" line="SystemMaxUse=1G" state=present
-
name
:
Add kernel parameter
script
:
configure-grub
# SSH
-
name
:
Configure ssh
lineinfile
:
dest=/etc/ssh/sshd_config regexp="^PermitRootLogin (.*)" line="PermitRootLogin yes" state=present
-
name
:
Configure ssh
lineinfile
:
dest=/etc/ssh/sshd_config regexp="^PasswordAuthentication (.*)" line="PasswordAuthentication yes" state=present
# Schedule and upgrade playbook
-
name
:
Install upgrader
shell
:
ansible-playbook upgrader-run.yml --extra-vars 'extra_playbook={{ extra_playbook }} upgrader_playbook={{ upgrader_playbook }} repeat_until_success={{ repeat_until_success }} upgrade_kernel={{ upgrade_kernel | default(False) == True }}' -i hosts 2>>/opt/upgrader/latest_daily_upgrade.log >> /opt/upgrader/latest_daily_upgrade.log
when
:
launch_upgrader
playbook/sha256sum
View file @
7ced67af
a07e4e316188077fee8abcbb1a31ee7bc9f8de28f55174bdb5c6a238a227df9d
-
55ce33d3e89f0093de552d8de66e306b6c142c06a4aa3e36e03954785f720047
-
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