tuned: make more robust, add become
This commit is contained in:
parent
b42c53e50b
commit
873d670016
3 changed files with 20 additions and 14 deletions
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
- name: create custom tuned profile directory
|
||||
become: true
|
||||
file:
|
||||
path: "/etc/tuned/{{ tuned_custom_profile.name }}"
|
||||
state: directory
|
||||
|
@ -8,16 +9,14 @@
|
|||
mode: 0755
|
||||
|
||||
- name: copy custom profile configuration file
|
||||
become: true
|
||||
template:
|
||||
src: custom_profile.conf.j2
|
||||
dest: "/etc/tuned/{{ tuned_custom_profile.name }}/tuned.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: restart tuned
|
||||
notify:
|
||||
- restart tuned
|
||||
- enable tuned profile
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue