]> git.friedersdorff.com Git - max/saltfiles.git/commitdiff
Globally ignore files
authorMaximilian Friedersdorff <max@friedersdorff.com>
Tue, 4 Jun 2019 08:56:30 +0000 (09:56 +0100)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Tue, 4 Jun 2019 08:56:30 +0000 (09:56 +0100)
states/git/files/gitignore [new file with mode: 0644]
states/git/init.sls

diff --git a/states/git/files/gitignore b/states/git/files/gitignore
new file mode 100644 (file)
index 0000000..6c5ee8d
--- /dev/null
@@ -0,0 +1,6 @@
+[._]*.s[a-w][a-z]
+[._]s[a-w][a-z]
+*.un~
+Session.vim
+.netrwhist
+*~
index 4d80ea07115339265a2c8d3ba358555ffb2fd208..3d1e0df74dcd6697767e7c98978a629ad4e44cd0 100644 (file)
@@ -2,7 +2,7 @@ include:
   - git.{{ grains['os'] | lower }}
 
 
-{% set git_vars = {
+{% set git_confs = {
   'color.ui': 'true',
   'color.branch': 'always',
   'color.status': 'always',
@@ -25,10 +25,18 @@ include:
 }
 %}
 
-{% 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'] }}