Merge pull request #166 from pawelrosada/master

Add enablerepo option to php-salt-formula
This commit is contained in:
Niels Abspoel 2019-03-26 20:17:48 +01:00 committed by GitHub
commit 4a0dfac0b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -75,6 +75,7 @@ php_ppa_{{ state }}:
{% elif grains['os_family'] == "RedHat" and (state == 'cli' or state == 'fpm' or state == 'php') %} {% elif grains['os_family'] == "RedHat" and (state == 'cli' or state == 'fpm' or state == 'php') %}
{% set use_scl_repo = salt['pillar.get']('php:use_scl_repo', False) %} {% set use_scl_repo = salt['pillar.get']('php:use_scl_repo', False) %}
{% set scl_php_version = salt['pillar.get']('php:scl_php_version', 71) %} {% set scl_php_version = salt['pillar.get']('php:scl_php_version', 71) %}
{% set enable_php_repo = salt['pillar.get']('php:ng:lookup:enable_php_repo', False) %}
{% if use_scl_repo and grains['os'] == 'CentOS' %} {% if use_scl_repo and grains['os'] == 'CentOS' %}
php_centos_scl_enable_{{ state }}: php_centos_scl_enable_{{ state }}:
pkg.installed: pkg.installed:
@ -90,6 +91,9 @@ php_install_{{ state }}:
pkg.installed: pkg.installed:
- name: {{ state }} - name: {{ state }}
- pkgs: {{ pkgs|json() }} - pkgs: {{ pkgs|json() }}
{% if enable_php_repo %}
- enablerepo: {{ enable_php_repo }}
{% endif %}
{% for pkg in specials %} {% for pkg in specials %}

View File

@ -20,7 +20,7 @@ php:
# represented, please consider adding it to the map.jinja for # represented, please consider adding it to the map.jinja for
# upstream inclusion # upstream inclusion
lookup: lookup:
enable_php_repo: centos-sclo-rh-testing
# package definitions, these can be strings, lists of strings, or # package definitions, these can be strings, lists of strings, or
# lists of dictionaries # lists of dictionaries
pkgs: pkgs: