Update tuned profile variable configuration file if it exists
Update /etc/tuned/{{ _TUNED_PROFILE_NAME_ }}-variables.conf only if it exists. Change-Id: I20562efd61ba49b3ae0af62c079967681e05aeed Closes-Bug: #1806812
This commit is contained in:
parent
f520c3bd99
commit
ce72766b97
@ -32,12 +32,16 @@
|
|||||||
|
|
||||||
# Tune-d Configuration
|
# Tune-d Configuration
|
||||||
- block:
|
- 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
|
- name: Tune-d Configuration
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/tuned/{{ _TUNED_PROFILE_NAME_ }}-variables.conf
|
dest: /etc/tuned/{{ _TUNED_PROFILE_NAME_ }}-variables.conf
|
||||||
regexp: '^isolated_cores=.*'
|
regexp: '^isolated_cores=.*'
|
||||||
line: 'isolated_cores={{ _TUNED_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
|
- name: Tune-d profile activation
|
||||||
shell: tuned-adm profile {{ _TUNED_PROFILE_NAME_ }}
|
shell: tuned-adm profile {{ _TUNED_PROFILE_NAME_ }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user