Skip to content

Commit

Permalink
htop
Browse files Browse the repository at this point in the history
  • Loading branch information
shellshock1953 committed Oct 16, 2023
1 parent 3313da8 commit 60b732e
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/htop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Molecule
on:
push:
paths:
- 'defaults/main/htop.yml'
- 'tasks/**'
- 'molecule/htop/**'
pull_request:
branches: [master]
paths:
- 'defaults/main/htop.yml'
- 'tasks/**'
- 'molecule/htop/**'
jobs:
tests:
runs-on: ubuntu-latest
name: component:htop
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: ${{ github.repository }}
- name: Molecule
uses: gofrolist/molecule-action@v2
with:
molecule_command: test
molecule_args: -d docker -s htop
molecule_working_dir: dnullproject/components
env:
ANSIBLE_FORCE_COLOR: '1'
12 changes: 12 additions & 0 deletions defaults/main/htop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
# htop
role_component:
htop:
install:
packages:
- htop
configs:
templates:
main:
template: htop
dest: ~/.config/htop/htoprc
13 changes: 13 additions & 0 deletions molecule/htop/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- name: Converge
hosts: all
gather_facts: true
remote_user: root
tasks:
# TODO: resolve deps
- name: Testing -- dummy
include_role:
name: components
vars:
role_component:
components: [dummy]
16 changes: 16 additions & 0 deletions molecule/htop/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: ubuntu_2004
image: mpaivabarbosa/molecule-systemd-ubuntu:20.04
pre_build_image: true
provisioner:
name: ansible
config_options:
defaults:
hash_behaviour: merge
verifier:
name: ansible
9 changes: 9 additions & 0 deletions molecule/htop/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# This is an example playbook to execute Ansible tests.
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Example assertion
ansible.builtin.assert:
that: true
26 changes: 26 additions & 0 deletions templates/htop
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=46 47 1
sort_key=46
sort_direction=1
hide_threads=0
hide_kernel_threads=0
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_megabytes=0
highlight_threads=1
tree_view=0
header_margin=0
detailed_cpu_time=0
cpu_count_from_zero=0
update_process_names=0
account_guest_in_cpu_meter=0
# color_scheme=5
delay=15
left_meters=LeftCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=RightCPUs Tasks LoadAverage Uptime
right_meter_modes=1 2 2 2

0 comments on commit 60b732e

Please sign in to comment.