- git.{{ grains['os'] | lower }}
-{% set git_vars = {
+{% set git_confs = {
'color.ui': 'true',
'color.branch': 'always',
'color.status': 'always',
}
%}
-{% for var,val in git_vars.items() %}
+{% for var,val in git_confs.items() %}
{{ var }}:
git.config_set:
- value: {{ val }}
- global: True
- user: {{ grains['user'] }}
{% endfor %}
+
+global gitignore:
+ file.managed:
+ - name: {{ grains['homedir'] }}/.gitignore
+ - source: {{ grains['stateroot'] }}/git/files/gitignore
+ - mode: 644
+ - user: {{ grains['user'] }}
+ - group: {{ grains['user'] }}