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
ecedc562
Commit
ecedc562
authored
Sep 07, 2023
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook/ors: run playbook once per day until it succeeds
parent
6bc7c003
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
22 deletions
+22
-22
playbook/ors.yml
playbook/ors.yml
+5
-0
playbook/roles/ors/meta/main.yml
playbook/roles/ors/meta/main.yml
+1
-0
playbook/roles/ors/tasks/main.yml
playbook/roles/ors/tasks/main.yml
+13
-21
playbook/settings/ors.yml
playbook/settings/ors.yml
+2
-0
playbook/sha256sum
playbook/sha256sum
+1
-1
No files found.
playbook/ors.yml
View file @
ecedc562
...
@@ -2,6 +2,11 @@
...
@@ -2,6 +2,11 @@
hosts
:
127.0.0.1
hosts
:
127.0.0.1
connection
:
local
connection
:
local
vars
:
-
upgrader_playbook
:
vifib-upgrade.yml
-
extra_playbook
:
ors.yml
-
repeat_until_success
:
True
vars_files
:
vars_files
:
-
settings/vifib.yml
-
settings/vifib.yml
-
settings/slapos-master.yml
-
settings/slapos-master.yml
...
...
playbook/roles/ors/meta/main.yml
View file @
ecedc562
---
---
dependencies
:
dependencies
:
-
{
role
:
package
,
package_name
:
anacron
,
package_state
:
present
}
-
{
role
:
package
,
package_name
:
patchelf
,
package_state
:
present
}
-
{
role
:
package
,
package_name
:
patchelf
,
package_state
:
present
}
-
{
role
:
package
,
package_name
:
util-linux
,
package_state
:
present
}
-
{
role
:
package
,
package_name
:
util-linux
,
package_state
:
present
}
-
{
role
:
package
,
package_name
:
grub-efi-amd64-signed
,
package_state
:
present
}
-
{
role
:
package
,
package_name
:
grub-efi-amd64-signed
,
package_state
:
present
}
playbook/roles/ors/tasks/main.yml
View file @
ecedc562
...
@@ -2,32 +2,20 @@
...
@@ -2,32 +2,20 @@
# Delete ors-upgrade.yml cron which is replaced by ors.yml
# Delete ors-upgrade.yml cron which is replaced by ors.yml
-
name
:
Check if ors-upgrade playbook is installed
-
name
:
Remove obsolete cron
shell
:
'
crontab
-l
|
grep
-q
ors-upgrade'
ignore_errors
:
yes
register
:
ors_upgrade_cron
-
name
:
Delete ors-upgrade cron
cron
:
name="Launch Upgrader with ansible" state=absent
cron
:
name="Launch Upgrader with ansible" state=absent
when
:
ors_upgrade_cron.rc ==
0
-
name
:
Check if vifib playbook is installed
-
name
:
Remove obsolete cron
shell
:
'
crontab
-l
|
grep
-A1
"#Ansible:
Launch
Upgrader
with
ansible"
|
grep
-v
ors-upgrade
|
grep
-q
"^*/10.*upgrader"'
cron
:
name="Launch Startup with ansible" state=absent
ignore_errors
:
yes
register
:
vifib_cron
-
name
:
Install vifib-base playbook
-
name
:
Remove obsolete cron
shell
:
ansible-playbook vifib-base.yml --extra-vars '{"period_minute":"*/10", "period_hour":"*"}'
cron
:
name="Launch ors playbook periodically" state=absent
when
:
vifib_cron.rc !=
0
-
name
:
Remove o
ld
cron
-
name
:
Remove o
bsolete
cron
cron
:
name="Launch ors playbook
every 3 hours
" state=absent
cron
:
name="Launch ors playbook
at reboot
" state=absent
-
name
:
Install periodic cron
-
name
:
Remove obsolete cron
cron
:
name="Launch ors playbook periodically" minute="*/10" hour="*" job='sleep 10 && flock -w 300 /opt/upgrader/ansible.lock -c "cd /opt/upgrader/playbook && PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin ansible-playbook ors.yml -i hosts 2>> /opt/upgrader/latest_ors.log >> /opt/upgrader/latest_ors.log"'
cron
:
name="Launch ors playbook every 3 hours" state=absent
-
name
:
Install reboot cron
cron
:
name="Launch ors playbook at reboot" special_time=reboot job='sleep 10 && flock -w 300 /opt/upgrader/ansible.lock -c "cd /opt/upgrader/playbook && PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin ansible-playbook ors.yml -i hosts 2>> /opt/upgrader/startup_ors.log >> /opt/upgrader/startup_ors.log"'
-
name
:
Enable and start cron.service
-
name
:
Enable and start cron.service
systemd
:
name=cron.service enabled=yes state=started
systemd
:
name=cron.service enabled=yes state=started
...
@@ -160,3 +148,7 @@
...
@@ -160,3 +148,7 @@
jump
:
SNAT
jump
:
SNAT
source_port
:
5353
source_port
:
5353
to_source
:
'
:53'
to_source
:
'
:53'
-
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/settings/ors.yml
View file @
ecedc562
---
---
install_folder
:
"
/opt/amarisoft"
install_folder
:
"
/opt/amarisoft"
amarisoft_version
:
"
2023-06-10"
launch_upgrader
:
True
playbook/sha256sum
View file @
ecedc562
572976325d64d618608d19c42dc6e2879086da332887672fc6a7f42c640e2472
-
ee08d5e3709ea1f504946fa5665cc01586503cd126aebdf171e160879b37be79
-
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