From e81f6e695caf083a7a9c77338951330d209c3c80 Mon Sep 17 00:00:00 2001 From: Sonia Hamilton Date: Thu, 8 Dec 2016 03:29:03 +0000 Subject: [PATCH] temp fix on git executable --- users/init.sls | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/users/init.sls b/users/init.sls index d92b999..969c3d0 100644 --- a/users/init.sls +++ b/users/init.sls @@ -430,12 +430,20 @@ users_googleauth-{{ svc }}-{{ name }}: {%- endfor %} {%- endif %} +# +# if not salt['cmd.has_exec']('git') +# fails even if git is installed +# +# this doesn't work (Salt bug), therefore need to run state.apply twice +#include: +# - users +# +#git: +# pkg.installed: +# - require_in: +# - sls: users +# {% if 'gitconfig' in user %} -{% if not salt['cmd.has_exec']('git') %} -skip_{{ name }}_gitconfig_since_git_not_installed: - test.fail_without_changes: - - name: "Git configuration for user {{ name }} has been skipped because Git is not installed." -{% else %} {% for key, value in user['gitconfig'].items() %} users_{{ name }}_user_gitconfig_{{ loop.index0 }}: {% if grains['saltversioninfo'] >= (2015, 8, 0, 0) %} @@ -453,7 +461,6 @@ users_{{ name }}_user_gitconfig_{{ loop.index0 }}: {% endif %} {% endfor %} {% endif %} -{% endif %} {% endfor %}