# Need feedback for kernel\_settings module implemented using tuned

**URL:** <https://forum.ansible.com/t/need-feedback-for-kernel-settings-module-implemented-using-tuned/32114>\
**Category:** Ansible Developer\
**Tags:** rhel, fedora\
**Created:** [February 1, 2020, 2:15am UTC](https://forum.ansible.com/t/need-feedback-for-kernel-settings-module-implemented-using-tuned/32114 "2020-02-01T02:15:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard\_Megginson](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/richard_megginson/32/4540_2.png) [@Richard\_Megginson](https://forum.ansible.com/u/Richard_Megginson)\
**Post date:** [February 1, 2020, 2:15am UTC](https://forum.ansible.com/t/need-feedback-for-kernel-settings-module-implemented-using-tuned/32114/1 "2020-02-01T02:15:50Z")

</div>

Tuned is really nice because it supports many different kernel, cpu, disk, power, bootloader (very limited), etc. settings in one shot, and provides sysfs setting persistence on rhel/fedora.

[https://github.com/redhat-performance/tuned](https://github.com/redhat-performance/tuned)

So I thought I might have a go at creating a kernel\_settings module implemented by importing the tuned code as a “library”. However, it’s getting pretty complex pretty quickly - WIP: [https://github.com/richm/kernel\_settings/blob/master/library/kernel\_settings.py](https://github.com/richm/kernel_settings/blob/master/library/kernel_settings.py)

- Have to defeat tuned logging - [https://github.com/richm/kernel\_settings/blob/master/library/kernel\_settings.py#L19-L54](https://github.com/richm/kernel_settings/blob/master/library/kernel_settings.py#L19-L54)

- Hard to tell the difference between when tuned reports that a profile file was not found vs. had some other problem reading the tuned profile: [https://github.com/richm/kernel\_settings/blob/master/library/kernel\_settings.py#L129-L150](https://github.com/richm/kernel_settings/blob/master/library/kernel_settings.py#L129-L150)

- Have to convert the ansible dict parameters to a tempfile in order to create a tuned profile data type: [https://github.com/richm/kernel\_settings/blob/master/library/kernel\_settings.py#L152-L178](https://github.com/richm/kernel_settings/blob/master/library/kernel_settings.py#L152-L178)

- Have to use some protected members of internal tuned data structures: [https://github.com/richm/kernel\_settings/blob/master/library/kernel\_settings.py#L222](https://github.com/richm/kernel_settings/blob/master/library/kernel_settings.py#L222) and [https://github.com/richm/kernel\_settings/blob/master/library/kernel\_settings.py#L145](https://github.com/richm/kernel_settings/blob/master/library/kernel_settings.py#L145)

I’m looking for some guidance from ansible module developers if this seems worth pursuing or maybe I should just use the sysctl module + implement my own sysfs support + use other existing modules.
