ansible-role-unix-users/templates/shell_rc_file.j2

23 lines
553 B
Plaintext
Raw Normal View History

#
# {{ 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 %}