From 275067afcf12f05df6b36cd288d5c9858707047e Mon Sep 17 00:00:00 2001 From: Colin Stubbs Date: Sun, 1 Apr 2018 21:50:19 +1000 Subject: [PATCH 1/2] Fix for issue #361 Add quick sanity check at start of state, do not attempt to do anything unless salt.gitfs.gitpython exists to check for install_from_source within --- salt/gitfs/gitpython.sls | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/salt/gitfs/gitpython.sls b/salt/gitfs/gitpython.sls index f1a48e6..7f1260a 100644 --- a/salt/gitfs/gitpython.sls +++ b/salt/gitfs/gitpython.sls @@ -1,5 +1,7 @@ {% from "salt/map.jinja" import salt_settings with context %} +{% if 'gitfs' in salt_settings and 'gitpython' in salt_settings.gitfs %} + {% if salt_settings.gitfs.gitpython.install_from_source %} GitPython: @@ -12,3 +14,5 @@ python-git: - name: {{ salt_settings.python_git }} {% endif %} + +{% endif %} From d40d869883835463d31c57637f3a2e0053bdb8c7 Mon Sep 17 00:00:00 2001 From: Colin Stubbs Date: Sun, 1 Apr 2018 21:52:29 +1000 Subject: [PATCH 2/2] Add os_family default for gitpython on RedHat salt.gitfs.gitpython.install_from_source == False on RedHat Not sure about other O/S'es as to what default value should be --- salt/map.jinja | 3 +++ 1 file changed, 3 insertions(+) diff --git a/salt/map.jinja b/salt/map.jinja index eb60f56..1772ab0 100644 --- a/salt/map.jinja +++ b/salt/map.jinja @@ -71,6 +71,9 @@ that differ from whats in defaults.yaml }, grain='os'), 'python_git': 'GitPython', 'gitfs': { + 'gitpython': { + 'install_from_source': False, + }, 'pygit2': { 'install_from_source': False, 'git': {