A simple role for managing sysfs settings permanently.
sysfs_configuration
- a configuration hash for sysfs rolename
- name of the configuration filepriority
- files are loaded in lexicographical order - files with higher priority are loaded lateroptions
- a hash with actual options which should be setaction
- mode or owner - when not specified the role sets the new value for specified attributeattribute
- name of an attribute, specified as a path without/sys
prefixvalue
- a new value for the attribute
- hosts: servers
roles:
- role: wybczu.sysctl
sysfs_configuration:
name: set_sda_timeout
priority: 50
options:
- { attribute: 'block/sda/device/timeout', value: '60' }
- { action: 'owner', attribute: 'power/state', value: 'root:power' }
- { action: 'mode', attribute: 'power/state', value: '0660' }
Apache