Skip to content

Commit

Permalink
Merge pull request #174 from spoage/fix-git-id-conflict
Browse files Browse the repository at this point in the history
Fixed conflict with git-formula
  • Loading branch information
puneetk committed Sep 2, 2015
2 parents c2d6e0e + f0e691f commit 4983fc5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
4 changes: 4 additions & 0 deletions salt/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ salt:
pygit2:
install_from_source: True
version: 0.23.0
git:
# if not false, should be state name
require_state: False
install_from_package: git
libgit2:
version: 0.23.0
install_from_source: True
Expand Down
10 changes: 8 additions & 2 deletions salt/gitfs/pygit2.sls
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{% from "salt/map.jinja" import salt_settings with context %}
{% set pygit2_settings = salt_settings.gitfs.pygit2 %}
git:
pkg.installed
{% if pygit2_settings.git.get('require_state', False) %}
include:
- {{ pygit2_settings.git.require_state }}
{% elif pygit2_settings.git.get('install_from_package', 'git') %}
pygit2-git:
pkg.installed:
- name: {{ pygit2_settings.git.install_from_package }}
{% endif %}
{% if pygit2_settings.install_from_source %}
{% set libgit2_settings = pygit2_settings.libgit2 %}
Expand Down
10 changes: 9 additions & 1 deletion salt/map.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ that differ from whats in defaults.yaml
'pygit2': {
'install_from_source': True,
'version': '0.22.1',
'git': {
'require_state': False,
'install_from_package': 'git',
},
'libgit2': {
'install_from_source': False,
},
Expand All @@ -25,7 +29,11 @@ that differ from whats in defaults.yaml
'pygit2': 'python-pygit2',
'gitfs': {
'pygit2': {
'install_from_source': False,
'install_from_source': False,
'git': {
'require_state': False,
'install_from_package': 'git',
},
},
},
'master': {
Expand Down

0 comments on commit 4983fc5

Please sign in to comment.