Skip to content
Snippets Groups Projects
Commit d4b44993 authored by Andreas Hamacher's avatar Andreas Hamacher
Browse files

manually removing conflicting modules

parent a89f30e9
No related branches found
No related tags found
1 merge request!335Version pinning and enableing the upgrade role to run at all times
---
- name: get kernel version
shell: uname -r
register: uname_r_output
check_mode: no
changed_when: False
- name: remove conflicting packages if kernel is going to changed
block:
- name: see if we have a lustre-client service
shell: systemctl status lustre-client
register: lustreStatus
changed_when: False
failed_when: '"could not be found" in lustreStatus.stdout'
- name: stop lustre
service: name=lustre-client state=stopped
become: true
when: lustreStatus.failed
- name: remove conflicting packages if kernel is going to changed
package:
state: absent
name:
- kmod-lustre-client
- kernel-devel
become: true
- name: remove mellanox rpms
yum:
state: absent
name:
- mlnx-ofa_kernel
- mlnx-ofa_kernel-devel
- mlnx-ofa_kernel-modules
- libibverbs
- libgpod
- usbmuxd
- libmlx5
- libmlx4
become: true
when: uname_r_output.stdout != KERNEL_VERSION
- name: install aptitude
apt: name=aptitude state=present
......@@ -52,6 +92,9 @@
name:
- kernel-devel-{{ KERNEL_VERSION }}
- kernel-{{ KERNEL_VERSION }}
- kernel-headers-{{ KERNEL_VERSION }}
- kernel-tools-{{ KERNEL_VERSION }}
- kernel-tools-libs-{{ KERNEL_VERSION }}
state: present
become: true
when: ansible_os_family=="RedHat"
......
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