From 2db2453f33c9459236bea73663adb2e09eae1161 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Wed, 3 Jun 2020 21:31:57 -0500 Subject: [PATCH] tuned - only do custom profile on EL distros, mq-deadline support limitation --- .../tuned/tasks/configure-custom-profile.yml | 22 +++++++++++++++++-- roles/tuned/tasks/main.yml | 21 +----------------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/roles/tuned/tasks/configure-custom-profile.yml b/roles/tuned/tasks/configure-custom-profile.yml index 087be78..7d06a82 100644 --- a/roles/tuned/tasks/configure-custom-profile.yml +++ b/roles/tuned/tasks/configure-custom-profile.yml @@ -1,6 +1,24 @@ -# borrowed from https://github.com/giovtorres/ansible-role-tuned/ -# trivially changed based on style preferences --- +- name: install packages + package: + name: "{{ item }}" + state: latest + with_items: + - tuned + - tuned-utils + +- name: start service + service: + name: tuned + enabled: yes + state: started + +- name: get active tuned profile + command: /usr/sbin/tuned-adm active + register: tuned_active + changed_when: false + ignore_errors: true + - name: create custom tuned profile directory file: path: "/etc/tuned/{{ tuned_custom_profile.name }}" diff --git a/roles/tuned/tasks/main.yml b/roles/tuned/tasks/main.yml index d483264..fb8919e 100644 --- a/roles/tuned/tasks/main.yml +++ b/roles/tuned/tasks/main.yml @@ -1,24 +1,5 @@ --- -- name: install packages - package: - name: "{{ item }}" - state: latest - with_items: - - tuned - - tuned-utils - -- name: start service - service: - name: tuned - enabled: yes - state: started - -- name: get active tuned profile - command: /usr/sbin/tuned-adm active - register: tuned_active - changed_when: false - ignore_errors: true - - name: deploy {{ tuned_custom_profile }} based on {{ tuned_base_profile }} include: configure-custom-profile.yml + when: (ansible_distribution in ["CentOS" , "Red Hat Enterprise Linux", "Fedora" ] and not is_atomic)