You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
952 B
36 lines
952 B
5 years ago
|
---
|
||
|
|
||
|
- name: Install tuned service
|
||
|
yum: name=tuned state=present
|
||
|
|
||
|
- name: Enabling tuned
|
||
|
service: name=tuned state=started enabled=yes
|
||
|
|
||
|
- name: Check actual tuned profile
|
||
|
shell: "tuned-adm active | awk -F': ' '{print $2}'"
|
||
|
register: tuned_profile
|
||
|
changed_when: False
|
||
|
ignore_errors: True
|
||
|
|
||
|
- name: Applying custom tuned profile
|
||
|
command: tuned-adm profile {{ system_tuned_profile }}
|
||
|
when:
|
||
|
- system_tuned_profile is defined
|
||
|
- tuned_profile.stdout != system_tuned_profile
|
||
|
|
||
|
- name: Applying virtual guest tuned profile
|
||
|
command: tuned-adm profile virtual-guest
|
||
|
when:
|
||
|
- ansible_virtualization_role == "guest"
|
||
|
- tuned_profile.stdout != "virtual-guest"
|
||
|
- system_tuned_profile is not defined
|
||
|
|
||
|
- name: Applying virtual host tuned profile
|
||
|
command: tuned-adm profile virtual-host
|
||
|
when:
|
||
|
- ansible_virtualization_role == "host"
|
||
|
- tuned_profile.stdout != "virtual-host"
|
||
|
- system_tuned_profile is not defined
|
||
|
|
||
|
...
|