giovtorres.tuned

Ansible角色:Tuned

构建状态 Ansible角色

安装和配置tuned守护进程以设置系统调优配置文件。 支持EL7。

要求

无。

角色变量

在EL7上可用的内置配置文件包括:

  • balanced(平衡)
  • desktop(桌面)
  • latency-performance(延迟性能)
  • network-latency(网络延迟)
  • network-throughput(网络吞吐量)
  • powersave(省电)
  • throughput-performance(吞吐量性能)
  • virtual-guest(虚拟客户)
  • virtual-host(虚拟主机)

使用上述内置配置之一更改活动的tuned配置:

tuned_active_builtin_profile: "throughput-performance"

通过创建自定义tuned配置来更改活动的tuned配置。请参见下面的示例,了解如何构建自定义tuned配置

tuned_active_custom_profile: ""

依赖

无。

示例剧本

要使用角色的默认配置throughput-performance,只需应用该角色:

- hosts: servers
  roles:
     - giovtorres.tuned

要使用其他可用的内置配置,在变量中设置tuned_active_builtin_profile

- hosts: servers
  vars:
    tuned_active_builtin_profile: "virtual-guest"
  roles:
     - giovtorres.tuned

要构建自定义配置,请使用tuned_active_custom_profile变量创建一个字典,其中包含名称部分项目,部分包含配置文件中部分的名称以及该部分中的选项/值对列表。

- hosts: all
  vars:
    tuned_active_custom_profile:
      name: my_custom_profile
      sections:
        - name: main
          params:
            - option: summary
              value: Test
            - option: include
              value: throughput-performance
        - name: sysctl
          params:
            - option: vm.dirty_ratio
              value: 30
            - option: vm.swappiness
              value: 30
        - name: vm
          params:
            - option: transparent_hugepages
              value: never
  roles:
    - giovtorres.tuned

上述剧本的结果如下配置输出:

[main]
summary=Test
include=throughput-performance

[sysctl]
vm.dirty_ratio=30
vm.swappiness=30

[vm]
transparent_hugepages=never

许可

BSD

关于项目

Installs and configures tuned, a system tuning tool.

安装
ansible-galaxy install giovtorres.tuned
许可证
Unknown
下载
202.8k
拥有者