2019-02-26 03:49:51 +00:00
|
|
|
---
|
|
|
|
|
2021-04-05 05:23:10 +00:00
|
|
|
- name: update apt caches
|
2023-08-31 01:30:26 +00:00
|
|
|
become: true
|
2021-04-05 05:23:10 +00:00
|
|
|
apt:
|
2023-08-31 01:30:26 +00:00
|
|
|
update_cache: true
|
2021-04-05 05:23:10 +00:00
|
|
|
when: (ansible_os_family in ["Debian"] )
|
|
|
|
|
2020-06-04 02:35:10 +00:00
|
|
|
- name: install packages
|
2023-08-31 01:30:26 +00:00
|
|
|
become: true
|
2020-06-04 02:35:10 +00:00
|
|
|
package:
|
|
|
|
name: "{{ item }}"
|
2023-08-31 01:30:26 +00:00
|
|
|
state: present
|
2020-06-04 02:35:10 +00:00
|
|
|
with_items:
|
2023-08-31 01:30:26 +00:00
|
|
|
- tuned
|
|
|
|
- tuned-utils
|
|
|
|
# - tuned-profiles-realtime # only on Fedora? not on centos 8 stream
|
2020-06-04 02:35:10 +00:00
|
|
|
|
|
|
|
- name: start service
|
2023-08-31 01:30:26 +00:00
|
|
|
become: true
|
2020-06-04 02:35:10 +00:00
|
|
|
service:
|
|
|
|
name: tuned
|
2023-08-31 01:30:26 +00:00
|
|
|
enabled: true
|
2020-06-04 02:35:10 +00:00
|
|
|
state: started
|
|
|
|
|
|
|
|
- name: get active tuned profile
|
2023-08-31 01:30:26 +00:00
|
|
|
become: true
|
2020-06-04 02:35:10 +00:00
|
|
|
command: /usr/sbin/tuned-adm active
|
|
|
|
register: tuned_active
|
|
|
|
changed_when: false
|
|
|
|
ignore_errors: true
|
|
|
|
|
2023-08-31 01:30:26 +00:00
|
|
|
- name: deploy custom tuned profiles
|
|
|
|
include_tasks: 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)
|