deploy-base/roles/tuned/tasks/main.yml

35 lines
785 B
YAML

---
- name: update apt caches
become: true
apt:
update_cache: true
when: (ansible_os_family in ["Debian"] )
- name: install packages
become: true
package:
name: "{{ item }}"
state: present
with_items:
- tuned
- tuned-utils
# - tuned-profiles-realtime # only on Fedora? not on centos 8 stream
- name: start service
become: true
service:
name: tuned
enabled: true
state: started
- name: get active tuned profile
become: true
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)