btop: Install btop and run it on the console

`btop` is so much better than `top`.  It makes a really nice status
indicator for machine health, so I like running it on tty1.
This commit is contained in:
2023-04-12 14:06:40 -05:00
parent e323324c54
commit db74e9ac3f
6 changed files with 104 additions and 0 deletions

53
roles/btop/tasks/main.yml Normal file
View File

@@ -0,0 +1,53 @@
- name: ensure btop is installed
package:
name: btop
state: present
tags:
- install
- name: ensure btop systemd unit is installed
copy:
src: btop.service
dest: /etc/systemd/system/btop.service
owner: root
group: root
mode: u=rw,go=r
notify:
- reload systemd
- restart btop
tags:
- systemd
- name: ensure btop configuration directory exists
file:
path: /etc/btop
owner: root
group: root
mode: u=rwx,go=rx
state: directory
tags:
- config
- name: ensure btop is configured
template:
src: btop.conf.j2
dest: /etc/btop/btop.conf
owner: root
group: root
mode: u=rw,go=r
notify:
- restart btop
tags:
- config
- name: ensure btop service is enabled
service:
name: btop
enabled: true
tags:
- service
- meta: flush_handlers
- name: ensure btop service is running
service:
name: btop
state: started