From 0261e875679f1bf63c8d689da7fc7e014597885d Mon Sep 17 00:00:00 2001 From: Stonewall Jackson Date: Sat, 4 Feb 2023 01:23:43 -0500 Subject: initial commit --- roles/tuned/defaults/main.yml | 1 + roles/tuned/tasks/main.yml | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 roles/tuned/defaults/main.yml create mode 100644 roles/tuned/tasks/main.yml (limited to 'roles/tuned') 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 -- cgit