Merge "Update tuned profile variable configuration file if it exists"

This commit is contained in:
Zuul 2018-12-14 13:40:04 +00:00 committed by Gerrit Code Review
commit 4d83acd892
1 changed files with 5 additions and 1 deletions

View File

@ -32,12 +32,16 @@
# Tune-d Configuration
- block:
- name: Check Tune-d Configuration file exists
stat:
path: /etc/tuned/{{ _TUNED_PROFILE_NAME_ }}-variables.conf
register: tuned_conf_stat_result
- name: Tune-d Configuration
lineinfile:
dest: /etc/tuned/{{ _TUNED_PROFILE_NAME_ }}-variables.conf
regexp: '^isolated_cores=.*'
line: 'isolated_cores={{ _TUNED_CORES_ }}'
when: _TUNED_CORES_|default("") != ""
when: tuned_conf_stat_result.stat.exists and _TUNED_CORES_|default("") != ""
- name: Tune-d profile activation
shell: tuned-adm profile {{ _TUNED_PROFILE_NAME_ }}