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

36 lines
785 B
YAML
Raw Normal View History

2019-02-26 03:49:51 +00:00
---
- name: update apt caches
2023-08-31 01:30:26 +00:00
become: true
apt:
2023-08-31 01:30:26 +00:00
update_cache: true
when: (ansible_os_family in ["Debian"] )
- name: install packages
2023-08-31 01:30:26 +00:00
become: true
package:
name: "{{ item }}"
2023-08-31 01:30:26 +00:00
state: present
with_items:
2023-08-31 01:30:26 +00:00
- tuned
- tuned-utils
# - tuned-profiles-realtime # only on Fedora? not on centos 8 stream
- name: start service
2023-08-31 01:30:26 +00:00
become: true
service:
name: tuned
2023-08-31 01:30:26 +00:00
enabled: true
state: started
- name: get active tuned profile
2023-08-31 01:30:26 +00:00
become: true
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
when: (ansible_distribution in ["CentOS" , "Red Hat Enterprise Linux", "RedHat", "Fedora" ] and not is_atomic)