Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
sst-bf: skip sst-bf.py execution on kernel versions lower than 5.1
Browse files Browse the repository at this point in the history
Signed-off-by: Przemyslaw Lal <[email protected]>
  • Loading branch information
przemeklal committed Apr 9, 2020
1 parent f1cb913 commit b0f6aef
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion roles/sst-bf-configure/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,22 @@
fail_msg: "The 'sst_bf_mode' variable must be set to 's', 'm' or 'r'. Please update your host vars."
when: sst_bf_configuration_enabled

- pause:
prompt: "Warning: SST-BF configuration cannot be applied - Linux kernel version is lower than 5.1"
seconds: 10
when: ansible_kernel is version_compare('5.1','<')

- name: configure CPU on node on Debian based distro
command: sst_bf.py -{{ sst_bf_mode }}
when:
- sst_bf_configuration_enabled
- ansible_os_family == "Debian"
- ansible_kernel is version_compare('5.1','>=')

- name: configure CPU on node on RHEL 7 based distro
shell: source /opt/rh/rh-python36/enable && /usr/local/bin/sst_bf.py -{{ sst_bf_mode }}
when:
- sst_bf_configuration_enabled
- ansible_distribution == 'CentOS' or ansible_distribution == 'RedHat'
- ansible_distribution_version < '8'
- ansible_distribution_version < '8'
- ansible_kernel is version_compare('5.1','>=')

0 comments on commit b0f6aef

Please sign in to comment.