25 lines
727 B
YAML
25 lines
727 B
YAML
# borrowed from https://github.com/giovtorres/ansible-role-tuned/
|
|
# trivially changed based on style preferences
|
|
---
|
|
- name: create custom tuned profile directory
|
|
file:
|
|
path: "/etc/tuned/{{ tuned_custom_profile.name }}"
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: 0755
|
|
|
|
- name: copy custom profile configuration file
|
|
template:
|
|
src: custom_profile.conf.j2
|
|
dest: "/etc/tuned/{{ tuned_custom_profile.name }}/tuned.conf"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: restart tuned
|
|
register: tuned_custom_profile_template
|
|
|
|
- name: set custom tuned profile
|
|
command: "/usr/sbin/tuned-adm profile {{ tuned_custom_profile.name }}"
|
|
when:
|
|
- tuned_custom_profile_template is changed
|