Execution
Date 25 Feb 2026 08:14:44 +0000
Duration 00:00:07.93
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.13
ara 1.7.4 / 1.7.4
Python 3.10.10
Summary
8 Hosts
1 Tasks
8 Results
1 Plays
1 Files
0 Records

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

---
- name: Playbook to install and config tuned on backup nodes
  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-backup-node-tweaks/
        mv /etc/tuned/ls-backup-node-tweaks/tuned.conf /etc/tuned/ls-backup-node-tweaks/tuned.conf.bak-$(date +%s)
        cat > /etc/tuned/ls-backup-node-tweaks/tuned.conf << EOF
        [main]
        summary=LS optimized profile for Backup Servers

        [sysctl]
        vm.swappiness = 10

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