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
b4e7544e
Commit
b4e7544e
authored
Sep 23, 2022
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook/ors: delete ors-upgrade cron in ors playbook
parent
f9490b0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
18 deletions
+5
-18
playbook/roles/ors-upgrade/tasks/main.yml
playbook/roles/ors-upgrade/tasks/main.yml
+1
-11
playbook/roles/ors/tasks/main.yml
playbook/roles/ors/tasks/main.yml
+4
-7
No files found.
playbook/roles/ors-upgrade/tasks/main.yml
View file @
b4e7544e
---
#
ORS playbook is installed before deleting ors-upgrade cron to make sure either ors or ors-upgrade is in the cron
#
ors-upgrade playbook is deprecated, use ors playbook instead
-
name
:
Install ors playbook
shell
:
ansible-playbook ors.yml
# Delete ors-upgrade.yml cron which is replaced by ors.yml
-
name
:
Delete ors-upgrade cron
cron
:
name="Launch Upgrader with ansible" state=absent
# Reinstall ORS playbook again since previous task deletes the vifib cron from the same name
-
name
:
Install ors playbook again
shell
:
ansible-playbook ors.yml
playbook/roles/ors/tasks/main.yml
View file @
b4e7544e
---
-
name
:
Check if ors-upgrade playbook is installed
shell
:
'
crontab
-l
|
grep
-q
ors-upgrade'
ignore_errors
:
yes
register
:
ors_upgrade_cron
-
name
:
Run ors-upgrade once so that it removes itself
shell
:
ansible-playbook ors-upgrade.yml
when
:
ors_upgrade_cron.rc ==
0
# Delete ors-upgrade.yml cron which is replaced by ors.yml
-
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'
...
...
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