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
591db17b
Commit
591db17b
authored
Sep 20, 2022
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ors-upgrade: replace ors-upgrade with ors
parent
125d10ff
Pipeline
#23670
passed with stage
in 0 seconds
Changes
12
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
79 additions
and
57 deletions
+79
-57
playbook/ors-upgrade.yml
playbook/ors-upgrade.yml
+0
-3
playbook/ors.yml
playbook/ors.yml
+1
-2
playbook/roles/ors-upgrade/tasks/main.yml
playbook/roles/ors-upgrade/tasks/main.yml
+9
-48
playbook/roles/ors/files/configure-grub.sh
playbook/roles/ors/files/configure-grub.sh
+0
-0
playbook/roles/ors/files/configure-re6st.sh
playbook/roles/ors/files/configure-re6st.sh
+0
-0
playbook/roles/ors/files/configure-slapos.py
playbook/roles/ors/files/configure-slapos.py
+0
-0
playbook/roles/ors/files/init-sdr.sh
playbook/roles/ors/files/init-sdr.sh
+0
-0
playbook/roles/ors/files/interfaces
playbook/roles/ors/files/interfaces
+0
-0
playbook/roles/ors/files/rm-tmp-lte
playbook/roles/ors/files/rm-tmp-lte
+0
-0
playbook/roles/ors/files/slapuser-rm-tmp
playbook/roles/ors/files/slapuser-rm-tmp
+0
-0
playbook/roles/ors/tasks/main.yml
playbook/roles/ors/tasks/main.yml
+69
-4
playbook/settings/ors.yml
playbook/settings/ors.yml
+0
-0
No files found.
playbook/ors-upgrade.yml
View file @
591db17b
...
...
@@ -2,8 +2,5 @@
hosts
:
127.0.0.1
connection
:
local
vars_files
:
-
settings/ors-upgrade.yml
roles
:
-
ors-upgrade
playbook/ors.yml
View file @
591db17b
...
...
@@ -3,8 +3,7 @@
connection
:
local
vars_files
:
-
settings/ors
-upgrade
.yml
-
settings/ors.yml
roles
:
-
ors-upgrade
-
ors
playbook/roles/ors-upgrade/tasks/main.yml
View file @
591db17b
---
-
name
:
Get hostname
shell
:
hostname
register
:
hostname
-
name
:
Check hostname
debug
:
var=hostname
# ORS playbook is installed before deleting ors-upgrade cron to make sure either ors or ors-upgrade is in the cron
-
name
:
Install
rm-tmp-lte script
copy
:
src=rm-tmp-lte dest={{ install_folder }} owner=root mode=770
-
name
:
Install
ors playbook
shell
:
ansible-playbook ors.yml
-
name
:
Give permission to slapuser to remove tmp files owned by other slapuser
copy
:
src=slapuser-rm-tmp dest=/etc/sudoers.d owner=root mode=440
# Delete ors-upgrade.yml cron which is replaced by ors.yml
-
name
:
Init SDR
script
:
init-sdr.sh
-
name
:
Delete ors-upgrade cron
cron
:
name="Launch Upgrader with ansible" state=absent
-
name
:
Check if Service Exists
stat
:
path=/etc/init.d/init-sdr
register
:
init_sdr_service
# Reinstall ORS playbook again since previous task deletes the vifib cron from the same name
-
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
:
Configure re6st
script
:
configure-re6st.sh
-
name
:
Configure /etc/network/interfaces
copy
:
src=interfaces dest=/etc/network/interfaces owner=root mode=644
-
name
:
Configure dhcp timeout
lineinfile
:
dest=/etc/dhcp/dhclient.conf regexp="^timeout (.*)" line="timeout 15" state=present
-
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
-
name
:
Configure slapos
script
:
configure-slapos.py
-
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
-
name
:
Add kernel parameter
script
:
configure-grub.sh
-
name
:
Install ors playbook again
shell
:
ansible-playbook ors.yml
playbook/roles/ors
-upgrade
/files/configure-grub.sh
→
playbook/roles/ors/files/configure-grub.sh
View file @
591db17b
File moved
playbook/roles/ors
-upgrade
/files/configure-re6st.sh
→
playbook/roles/ors/files/configure-re6st.sh
View file @
591db17b
File moved
playbook/roles/ors
-upgrade
/files/configure-slapos.py
→
playbook/roles/ors/files/configure-slapos.py
View file @
591db17b
File moved
playbook/roles/ors
-upgrade
/files/init-sdr.sh
→
playbook/roles/ors/files/init-sdr.sh
View file @
591db17b
File moved
playbook/roles/ors
-upgrade
/files/interfaces
→
playbook/roles/ors/files/interfaces
View file @
591db17b
File moved
playbook/roles/ors
-upgrade
/files/rm-tmp-lte
→
playbook/roles/ors/files/rm-tmp-lte
View file @
591db17b
File moved
playbook/roles/ors
-upgrade
/files/slapuser-rm-tmp
→
playbook/roles/ors/files/slapuser-rm-tmp
View file @
591db17b
File moved
playbook/roles/ors/tasks/main.yml
View file @
591db17b
---
-
name
:
Install
upgrader
shell
:
ansible-playbook upgrader-run.yml --extra-vars "upgrader_playbook=ors-upgrade.yml upgrade_kernel=False"
-
name
:
Install
periodic cron
cron
:
name="Launch ors playbook every 3 hours" minute="15" hour="*/3" job='cd /opt/upgrader/playbook && ansible-playbook ors.yml 2>> /opt/upgrader/latest_ors.log >> /opt/upgrader/latest_ors.log'
-
name
:
Set Cron
cron
:
name="Launch Startup with ansible" special_time=reboot job='sleep 20 && cd /opt/upgrader/playbook && ansible-playbook ors-upgrade.yml -i hosts 2>>/opt/upgrader/startup.log >> /opt/upgrader/startup.log'
-
name
:
Install reboot cron
cron
:
name="Launch ors playbook at reboot" special_time=reboot job='sleep 20 && cd /opt/upgrader/playbook && ansible-playbook ors.yml 2>> /opt/upgrader/startup_ors.log >> /opt/upgrader/startup_ors.log'
-
name
:
Check if vifib playbook is installed
shell
:
'
crontab
-l
|
grep
-A1
"#Ansible:
Launch
Upgrader
with
ansible"
|
tail
-n1
|
grep
-v
ors-upgrade
|
grep
-q
upgrader'
ignore_errors
:
yes
register
:
vifib_cron
-
name
:
Install vifib-base playbook
shell
:
ansible-playbook vifib-base.yml
when
:
vifib_cron.rc !=
0
-
name
:
Get hostname
shell
:
hostname
register
:
hostname
-
name
:
Check hostname
debug
:
var=hostname
-
name
:
Install rm-tmp-lte script
copy
:
src=rm-tmp-lte dest={{ install_folder }} owner=root mode=770
-
name
:
Give permission to slapuser to remove tmp files owned by other slapuser
copy
:
src=slapuser-rm-tmp dest=/etc/sudoers.d owner=root mode=440
-
name
:
Init SDR
script
:
init-sdr.sh
-
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
:
Configure re6st
script
:
configure-re6st.sh
-
name
:
Configure /etc/network/interfaces
copy
:
src=interfaces dest=/etc/network/interfaces owner=root mode=644
-
name
:
Configure dhcp timeout
lineinfile
:
dest=/etc/dhcp/dhclient.conf regexp="^timeout (.*)" line="timeout 15" state=present
-
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
-
name
:
Configure slapos
script
:
configure-slapos.py
-
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
-
name
:
Add kernel parameter
script
:
configure-grub.sh
playbook/settings/ors
-upgrade
.yml
→
playbook/settings/ors.yml
View file @
591db17b
File moved
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