https://github.com/deric/puppet-htop
Htop configuration - the ultimate missing module in Puppet world
https://github.com/deric/puppet-htop
Last synced: 5 months ago
JSON representation
Htop configuration - the ultimate missing module in Puppet world
- Host: GitHub
- URL: https://github.com/deric/puppet-htop
- Owner: deric
- License: apache-2.0
- Created: 2016-10-15T22:52:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-06-21T18:20:21.000Z (almost 2 years ago)
- Last Synced: 2025-04-24T22:15:17.347Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 132 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# puppet-htop
[](https://forge.puppetlabs.com/deric/htop) [](https://github.com/deric/puppet-htop/actions/workflows/tests.yaml) [](https://forge.puppetlabs.com/deric/htop/scores)
Manages [htop](https://github.com/htop-dev/htop) package and its configuration with Hiera support (optional).
## Usage
Basic definition will install `htop` package and create `/root/.config/htop/htoprc` file:
```puppet
include htop
```
Since htop 3, you can configure screens:
```yaml
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
```yaml
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:
```yaml
htop::defaults:
sort_key: 47 # sort by memory
highlight_base_name: 1
```
you can configure different options for each account:
```yaml
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:
```puppet
class{'htop':
defaults => {
sort_key => 46,
}
}
```
All Puppet variables are documented in [REFERENCE.md](./REFERENCE.md).
## Installation
Preferably using libarian or r10k:
```ruby
mod 'deric-htop'
```
## Requirements
* Puppet >= 7
* Ruby 2.7 and newer
## Dependencies
* `puppetlabs-stdlib` - `>= 2.5.0`