mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 10:19:09 +00:00 
			
		
		
		
	- sys-ctl-rpr-btrfs-balancer: suppress service flush for btrfs balancer (too expensive to run each play) - sys-daemon: replace raw systemctl calls with ansible.builtin.systemd (daemon_reload, daemon_reexec) - sys-service: split handler into 'Enable systemctl service' and 'Set systemctl service state', add become, async/poll, suppress flush guard Conversation: https://chatgpt.com/share/68c2f7a6-6fe4-800f-9d79-3e3b0ab4a563
		
			
				
	
	
		
			19 lines
		
	
	
		
			723 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			723 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| - name: "Enable systemctl service"
 | |
|   systemd:
 | |
|     name: "{{ system_service_id | get_service_name(SOFTWARE_NAME) }}"
 | |
|     enabled: yes
 | |
|     daemon_reload: true
 | |
|   become: true
 | |
|   async:  "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
 | |
|   poll:   "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
 | |
|   listen: refresh systemctl service
 | |
| 
 | |
| - name: "Set systemctl service state"
 | |
|   systemd:
 | |
|     name: "{{ system_service_id | get_service_name(SOFTWARE_NAME) }}"
 | |
|     state: "{{ system_service_state }}"
 | |
|   become: true
 | |
|   async:  "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
 | |
|   poll:   "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
 | |
|   when:   not (system_service_suppress_flush | bool)
 | |
|   listen: refresh systemctl service |