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

31 lines
706 B
YAML

---
- name: update apt caches
apt:
update_cache: yes
when: (ansible_os_family in ["Debian"] )
- name: install packages
package:
name: "{{ item }}"
state: latest
with_items:
- tuned
- tuned-utils
- tuned-profiles-realtime
- 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", "RedHat", "Fedora" ] and not is_atomic)