You've already forked ansible-role-unix-users
							
							fix: support ssh 'command' option
	
		
			
	
		
	
	
		
	
		
			Some checks reported errors
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build was killed
				
			
		
		
	
	
				
					
				
			
		
			Some checks reported errors
		
		
	
	continuous-integration/drone/push Build was killed
				
			This commit is contained in:
		| @@ -19,7 +19,8 @@ unix_users: {} | |||||||
| #         StrictHostKeyChecking: "no" | #         StrictHostKeyChecking: "no" | ||||||
| #         UserKnownHostFile: /dev/null | #         UserKnownHostFile: /dev/null | ||||||
| #       authorized_keys: | #       authorized_keys: | ||||||
| #       - alice@alice-pc.pub | #       - filename: alice@alice-pc.pub | ||||||
|  | #         # command: "" # optional | ||||||
| #       private_keys: | #       private_keys: | ||||||
| #       - alice@alice-pc.ed25519.key | #       - alice@alice-pc.ed25519.key | ||||||
| #     home: /home/alice | #     home: /home/alice | ||||||
|   | |||||||
| @@ -2,6 +2,10 @@ | |||||||
| # | # | ||||||
| # {{ ansible_managed }} | # {{ ansible_managed }} | ||||||
| # | # | ||||||
| {% for key in unix_user.value.ssh.authorized_keys %} | {% for authorized_key in unix_user.value.ssh.authorized_keys %} | ||||||
| {{ lookup('file', 'ssh/authorized_keys/' + key) }} | {% if authorized_key.command is defined and authorized_key.command | length > 0 %} | ||||||
|  | command="{{ authorized_key.command }}" {{ lookup('file', 'ssh/authorized_keys/' + authorized_key.filename ) }} | ||||||
|  | {% else %} | ||||||
|  | {{ lookup('file', 'ssh/authorized_keys/' + authorized_key.filename ) }} | ||||||
|  | {% endif %} | ||||||
| {% endfor %} | {% endfor %} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user