[sshd] Enables automatic removal of stale sockets. Useful for GPG forwarding
							parent
							
								
									cbea83ebc6
								
							
						
					
					
						commit
						3f8cdcf29d
					
				| 
						 | 
					@ -37,3 +37,16 @@
 | 
				
			||||||
    src: update-motd.d/05-service.j2
 | 
					    src: update-motd.d/05-service.j2
 | 
				
			||||||
    dest: /etc/update-motd.d/05-ansible
 | 
					    dest: /etc/update-motd.d/05-ansible
 | 
				
			||||||
    mode: 0755
 | 
					    mode: 0755
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- name: Enable automatic removal of stale sockets
 | 
				
			||||||
 | 
					  lineinfile:
 | 
				
			||||||
 | 
					    dest: /etc/ssh/sshd_config
 | 
				
			||||||
 | 
					    regexp: ^StreamLocalBindUnlink
 | 
				
			||||||
 | 
					    line: "StreamLocalBindUnlink yes # Enable automatic removal of stale sockets"
 | 
				
			||||||
 | 
					    state: present
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- name: Restart sshd
 | 
				
			||||||
 | 
					  systemd:
 | 
				
			||||||
 | 
					    enabled: yes
 | 
				
			||||||
 | 
					    state: restarted
 | 
				
			||||||
 | 
					    name: sshd
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue