aboutsummaryrefslogtreecommitdiffstats
path: root/roles/tuned
diff options
context:
space:
mode:
Diffstat (limited to 'roles/tuned')
-rw-r--r--roles/tuned/defaults/main.yml1
-rw-r--r--roles/tuned/tasks/main.yml19
2 files changed, 20 insertions, 0 deletions
diff --git a/roles/tuned/defaults/main.yml b/roles/tuned/defaults/main.yml
new file mode 100644
index 0000000..f02c787
--- /dev/null
+++ b/roles/tuned/defaults/main.yml
@@ -0,0 +1 @@
+tuned_profile: balanced
diff --git a/roles/tuned/tasks/main.yml b/roles/tuned/tasks/main.yml
new file mode 100644
index 0000000..36d2f16
--- /dev/null
+++ b/roles/tuned/tasks/main.yml
@@ -0,0 +1,19 @@
+- name: install tuned
+ dnf:
+ name: tuned
+ state: present
+
+- name: start tuned
+ systemd:
+ name: tuned
+ enabled: yes
+ state: started
+
+- name: get current tuned profile
+ slurp:
+ src: /etc/tuned/active_profile
+ register: tuned_active_profile
+
+- name: set tuned profile
+ command: 'tuned-adm profile {{ tuned_profile }}'
+ when: tuned_active_profile.content | b64decode | trim != tuned_profile