aliases from pillar
This commit is contained in:
@@ -62,13 +62,12 @@ fi
|
|||||||
PATH="${PATH}:${HOME}/.local/bin"
|
PATH="${PATH}:${HOME}/.local/bin"
|
||||||
|
|
||||||
alias random='< /dev/urandom tr -dc A-Za-z0-9 | head -c${1:-32};echo'
|
alias random='< /dev/urandom tr -dc A-Za-z0-9 | head -c${1:-32};echo'
|
||||||
{%- if bashrc_user is defined and bashrc_user == 'keiran' %}
|
{%- if bashrc_user is defined %}
|
||||||
{#- TODO: this should be in pillar #}
|
{%- if bashrc_user == 'root' and 'restic' in pillar %}
|
||||||
alias keirmounts=/home/keiran/Documents/scripts/mounts.sh
|
|
||||||
alias grive=/home/keiran/Documents/scripts/grive.sh
|
|
||||||
{%- endif %}
|
|
||||||
{%- if bashrc_user is defined and bashrc_user == 'root' and 'restic' in pillar %}
|
|
||||||
export RESTIC_REPOSITORY={{ salt.pillar.get('restic:repo') }}
|
export RESTIC_REPOSITORY={{ salt.pillar.get('restic:repo') }}
|
||||||
export RESTIC_PASSWORD={{ salt.pillar.get('restic:pass') }}
|
export RESTIC_PASSWORD={{ salt.pillar.get('restic:pass') }}
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
{%- for alias, cmd_str in salt.pillar.get("bash_aliases:{}".format(bashrc_user), {}).items() %}
|
||||||
|
alias {{ alias }}="{{ cmd_str }}"
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user