Htop configuration - the ultimate missing module in Puppet world
APACHE-2.0 License
Manages htop package and its configuration with Hiera support (optional).
Basic definition will install htop
package and create /root/.config/htop/htoprc
file:
include htop
Since htop 3, you can configure screens:
htop::users:
john:
options:
config_reader_min_version: 3
screens:
- name: 'Main'
header: 'PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command'
config:
sort_key: PERCENT_MEM
note, the config should include config_reader_min_version=3
.
In most cases you probably want to override just some configuration
htop::users:
root:
options:
sort_key: 47 # memory
highlight_base_name: 1
But you can also change global settings (applies to multiple accounts) e.g. via Hiera:
htop::defaults:
sort_key: 47 # sort by memory
highlight_base_name: 1
you can configure different options for each account:
htop::users:
foo:
options:
hide_kernel_threads: 0
bar:
options:
tree_view: 1
user options
will be merged into global defauls (defined in htop::config::defaults
).
or directly via puppet code:
class{'htop':
defaults => {
sort_key => 46,
}
}
All Puppet variables are documented in REFERENCE.md.
Preferably using libarian or r10k:
mod 'deric-htop'
puppetlabs-stdlib
- >= 2.5.0