Skip to content
Snippets Groups Projects
Commit 7d99257c authored by Gin Tan's avatar Gin Tan
Browse files

Merge branch 'ubuntu_fixes' into 'master'

pushing ubuntu specific fixes

See merge request hpc-team/ansible_cluster_in_a_box!280
parents fb50a8c7 202bca74
No related branches found
No related tags found
1 merge request!280pushing ubuntu specific fixes
......@@ -3,3 +3,4 @@
selinux: state=disabled
become: True
become_user: root
when: ansible_os_family=="RedHat"
......@@ -55,6 +55,13 @@
changed_when: False
args:
warn: False
- name: get kernel-devel version
shell: dpkg -l linux-image* | grep "^ii" | grep "linux-image-[0-9]" | sed 's/\ \ */ /g' | cut -f 2 -d " " | cut -f 3-5 -d "-"
register: dpkg_l_output
when: ansible_os_family=="Debian"
check_mode: no
changed_when: False
- name: get kernel version
shell: uname -r
......@@ -73,10 +80,14 @@
debug: var=uname_r_output
- name: set reboot when kernel has changed
set_fact:
set_fact:
reboot_now: true
when: not uname_r_output.stdout in rpm_q_output.stdout and ansible_os_family=="RedHat"
when: ansible_os_family=="RedHat" and not uname_r_output.stdout in rpm_q_output.stdout
- name: set reboot when kernel has changed
set_fact:
reboot_now: true
when: ansible_os_family=="Debian" and not uname_r_output.stdout in dpkg_l_output.stdout
- name: debug3
debug: var=reboot_now
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment