tuned: release-dependent profile basedir, lint
This commit is contained in:
parent
0c33dccba8
commit
c475723f52
4 changed files with 35 additions and 25 deletions
|
@ -1,14 +1,14 @@
|
|||
---
|
||||
|
||||
- name: update apt caches
|
||||
- name: Update apt caches
|
||||
become: true
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
when: (ansible_os_family in ["Debian"] )
|
||||
|
||||
- name: install packages
|
||||
- name: Install packages
|
||||
become: true
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items:
|
||||
|
@ -16,20 +16,23 @@
|
|||
- tuned-utils
|
||||
# - tuned-profiles-realtime # only on Fedora? not on centos 8 stream
|
||||
|
||||
- name: start service
|
||||
- name: Gather Package Facts # 'tuned' release determines profile location
|
||||
ansible.builtin.package_facts:
|
||||
|
||||
- name: Start service
|
||||
become: true
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: tuned
|
||||
enabled: true
|
||||
state: started
|
||||
|
||||
- name: get active tuned profile
|
||||
- name: Get active tuned profile
|
||||
become: true
|
||||
command: /usr/sbin/tuned-adm active
|
||||
ansible.builtin.command: /usr/sbin/tuned-adm active
|
||||
register: tuned_active
|
||||
changed_when: false
|
||||
ignore_errors: true
|
||||
|
||||
- name: deploy custom tuned profiles
|
||||
include_tasks: configure-custom-profile.yml
|
||||
when: (ansible_distribution in ["CentOS" , "Red Hat Enterprise Linux", "RedHat", "Fedora" ] and not is_atomic)
|
||||
- name: Deploy custom tuned profiles
|
||||
ansible.builtin.include_tasks: configure-custom-profile.yml
|
||||
when: not ansible_local.os.is_atomic
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue