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
Rafael Monnerat
slapos.package
Commits
310d1b18
Commit
310d1b18
authored
Sep 23, 2022
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook/ors: reorder vifib and ors-upgrade cron detection
parent
cd485c6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
playbook/roles/ors/tasks/main.yml
playbook/roles/ors/tasks/main.yml
+12
-6
No files found.
playbook/roles/ors/tasks/main.yml
View file @
310d1b18
---
# Delete ors-upgrade.yml cron which is replaced by ors.yml
#
-
name
:
Check if ors-upgrade playbook is installed
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
-
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
:
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'
when
:
ors_upgrade_cron.rc ==
0
-
name
:
Check if vifib playbook is installed
shell
:
'
crontab
-l
|
grep
-A1
"#Ansible:
Launch
Upgrader
with
ansible"
|
grep
-v
ors-upgrade
|
grep
-q
upgrader'
...
...
@@ -20,6 +20,12 @@
shell
:
ansible-playbook vifib-base.yml
when
:
vifib_cron.rc !=
0
-
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
:
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
:
Get hostname
shell
:
hostname
...
...
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