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

38 lines
901 B
YAML

---
- name: Update apt caches
become: true
ansible.builtin.apt:
update_cache: true
when: (ansible_os_family in ["Debian"] )
- name: Install packages
become: true
ansible.builtin.package:
name: "{{ item }}"
state: present
with_items:
- tuned
- tuned-utils
# - tuned-profiles-realtime # only on Fedora? not on centos 8 stream
- name: Gather Package Facts # 'tuned' release determines profile location
ansible.builtin.package_facts:
- name: Start service
become: true
ansible.builtin.service:
name: tuned
enabled: true
state: started
- name: Get active tuned profile
become: true
ansible.builtin.command: /usr/sbin/tuned-adm active
register: tuned_active
changed_when: false
ignore_errors: true
- name: Deploy custom tuned profiles
ansible.builtin.include_tasks: configure-custom-profile.yml
when: not ansible_local.os.is_atomic