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
fc6fcf99
Commit
fc6fcf99
authored
Mar 22, 2024
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
roles/upgrader: wait until machine has internet to execute playbook
parent
21ba67a0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
playbook/roles/upgrader/tasks/main.yml
playbook/roles/upgrader/tasks/main.yml
+2
-2
playbook/sha256sum
playbook/sha256sum
+1
-1
No files found.
playbook/roles/upgrader/tasks/main.yml
View file @
fc6fcf99
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
when
:
extra_playbook == "ors.yml"
when
:
extra_playbook == "ors.yml"
-
name
:
Set Cron to repeat until success
-
name
:
Set Cron to repeat until success
cron
:
name="Repeat until success" minute="*/5" hour="*" job="
curl -fIs $(grep "^deb" /etc/apt/sources.list| cut -f2 -d' ' | head -n1) &&
flock -n /opt/upgrader/ansible.lock -c \"cd /opt/upgrader/playbook && PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 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 }} playbook_report={{ playbook_report_fact }}' -i hosts 2>>/opt/upgrader/latest_repeat_upgrade.log >> /opt/upgrader/latest_repeat_upgrade.log\""
cron
:
name="Repeat until success" minute="*/5" hour="*" job="
while ! curl -fIs $(grep "^deb" /etc/apt/sources.list| cut -f2 -d' ' | head -n1) ; do sleep 1 ; done ;
flock -n /opt/upgrader/ansible.lock -c \"cd /opt/upgrader/playbook && PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 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 }} playbook_report={{ playbook_report_fact }}' -i hosts 2>>/opt/upgrader/latest_repeat_upgrade.log >> /opt/upgrader/latest_repeat_upgrade.log\""
when
:
repeat_until_success | bool
when
:
repeat_until_success | bool
-
name
:
Get monitor private directory path
-
name
:
Get monitor private directory path
...
@@ -177,5 +177,5 @@
...
@@ -177,5 +177,5 @@
when
:
repeat_until_success | bool
when
:
repeat_until_success | bool
-
name
:
Set Anacron after successful playbook run
-
name
:
Set Anacron after successful playbook run
lineinfile
:
dest=/etc/anacrontab regexp="^[0-9]+ [0-9]+ extra.playbook (.*)" line="1 10 extra.playbook
curl -fIs $(grep "^deb" /etc/apt/sources.list| cut -f2 -d' ' | head -n1) &&
flock -n /opt/upgrader/ansible.lock -c \"[ -d /opt/upgrader/playbook-tmp ] && { rm -rf /opt/upgrader/playbook ; mv /opt/upgrader/playbook-tmp /opt/upgrader/playbook/ ; } ; cd /opt/upgrader/playbook && PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 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 }} playbook_report={{ playbook_report_fact }}' -i hosts 2>>/opt/upgrader/latest_daily_upgrade.log >> /opt/upgrader/latest_daily_upgrade.log\"" state=present
lineinfile
:
dest=/etc/anacrontab regexp="^[0-9]+ [0-9]+ extra.playbook (.*)" line="1 10 extra.playbook
while ! curl -fIs $(grep "^deb" /etc/apt/sources.list| cut -f2 -d' ' | head -n1) ; do sleep 1 ; done ;
flock -n /opt/upgrader/ansible.lock -c \"[ -d /opt/upgrader/playbook-tmp ] && { rm -rf /opt/upgrader/playbook ; mv /opt/upgrader/playbook-tmp /opt/upgrader/playbook/ ; } ; cd /opt/upgrader/playbook && PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 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 }} playbook_report={{ playbook_report_fact }}' -i hosts 2>>/opt/upgrader/latest_daily_upgrade.log >> /opt/upgrader/latest_daily_upgrade.log\"" state=present
when
:
repeat_until_success | bool
when
:
repeat_until_success | bool
playbook/sha256sum
View file @
fc6fcf99
d5a847c46b8beab02b28f0284234a274112d92e007fd1afc4eb86c22cd68816e
-
6f72502c6a9f517136c9763b9316f0dacf48176d8378f54734713c6d2259f148
-
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