convert two reboot tasks running on changed to handlers
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				/ Ansible Lint (push) Failing after 1m37s
				
			
		
		
	
	
		
	
		
			Some checks failed
		
		
	
	/ Ansible Lint (push) Failing after 1m37s
				
			This fixes ansible-lint no-handler complaints.
This commit is contained in:
		
					parent
					
						
							
								db02969168
							
						
					
				
			
			
				commit
				
					
						e3a29c422a
					
				
			
		
					 4 changed files with 11 additions and 10 deletions
				
			
		|  | @ -11,13 +11,10 @@ | |||
|         owner: root | ||||
|         group: root | ||||
|         src: sshd_config.j2 | ||||
|       register: deploy_ssh_server_config__ssh_config_copy_result | ||||
|       notify: | ||||
|         # Reboot instead of just restarting the ssh service, since I don't know how Ansible reacts, when it restarts the service it probably needs for the connection. | ||||
|         - reboot the system | ||||
| 
 | ||||
|     - name: deactivate short moduli | ||||
|       ansible.builtin.shell: | ||||
|         cmd: awk '$5 >= 3071' /etc/ssh/moduli > /etc/ssh/moduli.tmp && mv /etc/ssh/moduli.tmp /etc/ssh/moduli | ||||
| 
 | ||||
|     # Rebooting here instead of restarting the ssh service, since I don't know how Ansible reacts, when it restarts the service it probably needs for the connection. | ||||
|     - name: reboot, if ssh server config got changed | ||||
|       ansible.builtin.reboot: | ||||
|       when: deploy_ssh_server_config__ssh_config_copy_result.changed | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue