Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-team
HPCasCode
Commits
453cecfb
Commit
453cecfb
authored
8 years ago
by
Chris Hines
Browse files
Options
Downloads
Patches
Plain Diff
reboot after upgrading the kernel
parent
c28a5b14
No related branches found
Branches containing commit
No related tags found
1 merge request
!85
reboot after upgrading the kernel
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/upgrade/tasks/main.yml
+29
-0
29 additions, 0 deletions
roles/upgrade/tasks/main.yml
with
29 additions
and
0 deletions
roles/upgrade/tasks/main.yml
+
29
−
0
View file @
453cecfb
...
...
@@ -16,3 +16,32 @@
become
:
true
become_user
:
root
when
:
ansible_os_family=="RedHat"
-
name
:
get kernel-devel version
shell
:
rpm -q kernel-devel | cut -f 3,4 -d "-"
register
:
rpm_q_output
-
name
:
get kernel version
shell
:
uname -r
register
:
uname_r_output
-
name
:
default dont reboot
set_fact
:
reboot_now=False
-
name
:
set reboot when kernel has changed
set_fact
:
reboot_now=True
when
:
not rpm_q_output.stdout in uname_r_output.stdout
-
name
:
restart machine
shell
:
"
sleep
5;
sudo
shutdown
-r
now"
async
:
2
poll
:
1
ignore_errors
:
true
sudo
:
true
when
:
reboot_now
-
name
:
waiting for server to come back
local_action
:
wait_for host={{ ansible_host }} state=started port=22 delay=30 timeout=600 search_regex=OpenSSH
sudo
:
false
when
:
reboot_now
This diff is collapsed.
Click to expand it.
Chris Hines
@chines
mentioned in commit
e421c353
·
4 years ago
mentioned in commit
e421c353
mentioned in commit e421c353810f3d3f105d478b88c5d9a6b23886d6
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment