You've already forked ansible-role-unix-users
							
							feat: support bashrc aliases, envs and functions
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							
								
								
									
										23
									
								
								templates/shell_rc_file.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								templates/shell_rc_file.j2
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
#
 | 
			
		||||
# {{ ansible_managed }}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
{% if shell_rc_file.functions is defined %}
 | 
			
		||||
{% for function in shell_rc_file.functions %}
 | 
			
		||||
function {{ function.name }} {
 | 
			
		||||
{{ function.body | indent(2, True) }}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
{% endfor %}
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% if shell_rc_file.envs is defined %}
 | 
			
		||||
{% for env in shell_rc_file.envs %}
 | 
			
		||||
{{ 'export ' if env.export is defined and env.export }}{{ env.key }}="{{ env.value }}"
 | 
			
		||||
{% endfor %}
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
{% if shell_rc_file.aliases is defined %}
 | 
			
		||||
{% for alias in shell_rc_file.aliases %}
 | 
			
		||||
alias {{ alias.key }}='{{ alias.value }}'
 | 
			
		||||
{% endfor %}
 | 
			
		||||
{% endif %}
 | 
			
		||||
		Reference in New Issue
	
	Block a user