Execution
Date 25 Nov 2025 10:43:48 +0000
Duration 00:00:12.75
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.11
ara 1.7.3 / 1.7.3
Python 3.10.10
Summary
21 Hosts
1 Tasks
21 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/kuly/RM10126-CR-tuned-install.yaml

---
- name: Playbook to install and config tuned on CRs
  hosts: all
  gather_facts: false
  tasks:
    - name: Install
      ansible.builtin.shell: |
        set -o pipefail
        # dnf clean all
        # dnf -y install tuned
        # systemctl enable --now tuned.service
        # mkdir -p /etc/tuned/ls-cr-tweaks/
        mv /etc/tuned/ls-cr-tweaks/tuned.conf /etc/tuned/ls-cr-tweaks/tuned.conf.bak-$(date +%s)
        cat > /etc/tuned/ls-cr-tweaks/tuned.conf << EOF
        [main]
        summary=LS optimized profile for COMPUTE RESOURCES

        [sysctl]
        vm.swappiness = 10

        [scheduler]
        sched_migration_cost_ns = 5000000
        EOF
        tuned-adm profile ls-cr-tweaks
        tuned-adm active | grep ls-cr-tweaks && echo "Profile ls-cr-tweaks is active" || echo "Profile ls-cr-tweaks is not active"
      args:
        executable: /bin/bash
      changed_when: false