mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 10:19:09 +00:00 
			
		
		
		
	This commit restructures systemctl service definitions and category mappings. Motivation: Alarm-related bugs revealed inconsistencies in service and role handling. Preparation step: lays the groundwork for fixing the alarm issues by aligning categories, roles, and service templates.
		
			
				
	
	
		
			33 lines
		
	
	
		
			888 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			888 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| # Journalctl
 | |
| 
 | |
| This Ansible role manages the configuration of `systemd-journald` on target hosts.
 | |
| 
 | |
| ## Description
 | |
| 
 | |
| - Copies a customized `journald.conf` to `/etc/systemd/journald.conf`  
 | |
| - Ensures log retention for one week  
 | |
| - Restarts the `systemd-journald` service when configuration changes  
 | |
| - Supports live log streaming via `journalctl -f`
 | |
| 
 | |
| ## Overview
 | |
| 
 | |
| 1. **Template deployment**  
 | |
|    The role places your `journald.conf.j2` template into `/etc/systemd/journald.conf`.
 | |
| 2. **Service handler**  
 | |
|    On change, it notifies a handler to restart `systemd-journald`.
 | |
| 3. **Monitoring**  
 | |
|    You can follow logs in real time with `journalctl -f`.
 | |
| 
 | |
| ## Features
 | |
| 
 | |
| - Customizable retention and runtime limits  
 | |
| - Seamless restarts on config update  
 | |
| - Integration with `sys-ctl-hlth-journalctl` for downstream monitoring
 | |
| 
 | |
| ## Usage
 | |
| 
 | |
| ```yaml
 | |
| - hosts: all
 | |
|   roles:
 | |
|     - role: sys-svc-journalctl
 |