paulbsd-salt/states/php/config.sls
2020-10-25 16:37:33 +01:00

30 lines
690 B
Plaintext

---
{%- from "php/map.jinja" import php with context %}
{%- if php.config != None %}
php-config:
ini.options_present:
- name: {{ php.config_file }}
- separator: '='
- sections: {{ php.config }}
- watch_in:
- service: php-fpm-service
{%- endif %}
{%- if php.fpm.config != None %}
php-fpm-config:
ini.options_present:
- name: {{ php.fpm.config_file }}
- separator: '='
- sections: {{ php.fpm.config }}
- watch_in:
- service: php-fpm-service
{%- endif %}
{%- for extension in php.extensions %}
php-extension-enable-{{ extension }}:
cmd.run:
- name: phpenmod {{ extension }}
- watch_in:
- service: php-fpm-service
{%- endfor %}