diff --git a/README.rst b/README.rst index d11530a..6706b4c 100644 --- a/README.rst +++ b/README.rst @@ -67,6 +67,7 @@ Install gitfs backend GitPython dependenciess. Set ``salt:master:gitfs_provider: ---------------------- Install gitfs backend libgit2/pygit2 dependenciess. Set ``salt:master:gitfs_provider: pygit2`` in your pillar. +For EL distributions, pygit is installed from packages from `EPEL `_. ``salt.pkgrepo`` ---------------- @@ -77,6 +78,8 @@ and Ubuntu, and aims to implement the `installation recommendations of the official documentation `_. +On EL distributions, the official Salt `COPR for ZeroMQ 4 `_. Salt itself is installed via `EPEL `_. + ``salt.pkgrepo.absent`` ----------------------- diff --git a/salt/gitfs/pygit2.sls b/salt/gitfs/pygit2.sls index 22e9da1..585a08a 100644 --- a/salt/gitfs/pygit2.sls +++ b/salt/gitfs/pygit2.sls @@ -53,8 +53,7 @@ install-pygit2: - name: pygit2 {% else %} -# install from package -# TODO haven't actually found a distro that has a good version to test -# debian jessie will have libgit2-21 +{{ salt_settings.pygit2 }}: + pkg.installed {% endif %} diff --git a/salt/map.jinja b/salt/map.jinja index b8347d0..9878a77 100644 --- a/salt/map.jinja +++ b/salt/map.jinja @@ -14,7 +14,18 @@ that differ from whats in defaults.yaml 'CentOS': {}, 'Amazon': {}, 'Fedora': {}, - 'RedHat': {}, + 'RedHat': { + 'pygit2': 'python-pygit2', + 'gitfs': { + 'pygit2': { + 'install_from_source': False + }, + }, + 'master': { + 'gitfs_provider': 'pygit2' + }, + 'repotype': 'epel' + }, 'Suse': {}, 'Gentoo': { 'salt_master': 'app-admin/salt', diff --git a/salt/pkgrepo/init.sls b/salt/pkgrepo/init.sls index 67e3596..1f10148 100644 --- a/salt/pkgrepo/init.sls +++ b/salt/pkgrepo/init.sls @@ -1,4 +1,6 @@ -{% if grains['os_family'] == 'Debian' %} +{% set name = { + 'RedHat': 'redhat', + 'Debian': grains['os']|lower, +}.get(grains.os_family) %} include: - - .{{ grains['os']|lower }} -{% endif %} + - .{{ name }} diff --git a/salt/pkgrepo/redhat/absent.sls b/salt/pkgrepo/redhat/absent.sls new file mode 100644 index 0000000..e69de29 diff --git a/salt/pkgrepo/redhat/init.sls b/salt/pkgrepo/redhat/init.sls new file mode 100644 index 0000000..feb167c --- /dev/null +++ b/salt/pkgrepo/redhat/init.sls @@ -0,0 +1,10 @@ +{% from "salt/map.jinja" import salt_settings with context %} + +saltstack-zeromq4: + pkgrepo.managed: + - humanname: Copr repo for zeromq4 owned by saltstack + - baseurl: http://copr-be.cloud.fedoraproject.org/results/saltstack/zeromq4/{{ salt_settings.repotype }}-$releasever-$basearch/ + - gpgcheck: 1 + - gpgkey: https://copr-be.cloud.fedoraproject.org/results/saltstack/zeromq4/pubkey.gpg + - skip_if_unavailable: True + - enabled: 1