Add enablerepo option to php-salt-formula

This commit is contained in:
Paweł Rosada 2019-03-25 08:15:05 +01:00 committed by GitHub
parent df0224fd35
commit 324ebd84af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,15 +75,15 @@ php_ppa_{{ state }}:
{% 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 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' %}
php_centos_scl_enable_{{ state }}:
pkg.installed:
- name: centos-release-scl
{% elif use_scl_repo and grains['os'] == 'RedHat' %}
php_redhat_scl_enable_{{ state }}:
cmd.run:
- name: yum-config-manager --enable rhel-server-rhscl-{{ grains['osmajorrelease'] }}-rpms
{% endif %}
pkg.installed:
- name: {{ state }}
- pkgs: {{ pkgs|json() }}
{% if enable_php_repo %}
- enablerepo: {{ enable_php_repo }}
{% endif %}
php_install_{{ state }}: