2019-02-26 03:49:51 +00:00
|
|
|
---
|
|
|
|
|
2021-04-05 05:23:10 +00:00
|
|
|
- name: update apt caches
|
|
|
|
apt:
|
|
|
|
update_cache: yes
|
|
|
|
when: (ansible_os_family in ["Debian"] )
|
|
|
|
|
2020-06-04 02:35:10 +00:00
|
|
|
- name: install packages
|
|
|
|
package:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: latest
|
|
|
|
with_items:
|
|
|
|
- tuned
|
|
|
|
- tuned-utils
|
2021-04-05 05:23:10 +00:00
|
|
|
- tuned-profiles-realtime
|
2020-06-04 02:35:10 +00:00
|
|
|
|
|
|
|
- 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
|
|
|
|
|
2020-06-04 02:15:43 +00:00
|
|
|
- name: deploy {{ tuned_custom_profile }} based on {{ tuned_base_profile }}
|
|
|
|
include: configure-custom-profile.yml
|
2021-04-05 05:23:10 +00:00
|
|
|
when: (ansible_distribution in ["CentOS" , "Red Hat Enterprise Linux", "RedHat", "Fedora" ] and not is_atomic)
|