moved salt from alias to functin, added username pillar
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
```
|
||||
alias salt='sudo salt-call --local --file-root "$HOME/salt/states" --pillar-root "$HOME/salt/pillars" "$@"'
|
||||
function salt(){
|
||||
sudo salt-call --local --file-root "$HOME/salt/states" --pillar-root "$HOME/salt/pillars" "$@" pillar="{username: $USER}"
|
||||
}
|
||||
```
|
||||
|
@@ -3,15 +3,14 @@ packages:
|
||||
|
||||
vim:
|
||||
plugins:
|
||||
jonas:
|
||||
calendar-vim:
|
||||
name: https://github.com/mattn/calendar-vim.git
|
||||
vim-commentary:
|
||||
name: https://github.com/tpope/vim-commentary.git
|
||||
vim-instant-markdown:
|
||||
name: https://github.com/suan/vim-instant-markdown.git
|
||||
vim-surround:
|
||||
name: https://github.com/tpope/vim-surround.git
|
||||
vimwiki:
|
||||
name: https://github.com/vimwiki/vimwiki.git
|
||||
calendar-vim:
|
||||
name: https://github.com/mattn/calendar-vim.git
|
||||
vim-commentary:
|
||||
name: https://github.com/tpope/vim-commentary.git
|
||||
vim-instant-markdown:
|
||||
name: https://github.com/suan/vim-instant-markdown.git
|
||||
vim-surround:
|
||||
name: https://github.com/tpope/vim-surround.git
|
||||
vimwiki:
|
||||
name: https://github.com/vimwiki/vimwiki.git
|
||||
|
||||
|
@@ -1,9 +1,7 @@
|
||||
{% for user, plugins in pillar['vim']['plugins'].items() %}
|
||||
{% for plugin, args in plugins.items() %}
|
||||
{% for plugin, args in pillar['vim']['plugins'].items() %}
|
||||
{{ plugin }}:
|
||||
git.latest:
|
||||
- name: {{ args['name'] }}
|
||||
- target: {{ salt['user.info']( user ).home }}/.vim/bundle/{{ plugin }}
|
||||
- user: {{ user }}
|
||||
{% endfor %}
|
||||
- target: {{ salt['user.info']( pillar['username'] ).home }}/.vim/bundle/{{ plugin }}
|
||||
- user: {{ pillar['username'] }}
|
||||
{% endfor %}
|
||||
|
Reference in New Issue
Block a user