up2date
This commit is contained in:
@@ -7,13 +7,15 @@ nginx:
|
||||
- reload: True
|
||||
|
||||
{% if salt.pillar.get('use_php', True) %}
|
||||
{% from "nginx/map.jinja" import php_ver with context %}
|
||||
|
||||
{% set timezone = salt.timezone.get_zone() %}
|
||||
|
||||
php-fpm:
|
||||
pkg.installed: []
|
||||
{% if php_ver is not none %}
|
||||
service.running:
|
||||
- name: php7.0-fpm
|
||||
- name: php{{php_ver}}-fpm
|
||||
- enable: True
|
||||
- watch:
|
||||
- file: php_cgi.fixpathinfo=1
|
||||
@@ -21,19 +23,23 @@ php-fpm:
|
||||
|
||||
php_cgi.fixpathinfo=1:
|
||||
file.uncomment:
|
||||
- name: /etc/php/7.0/fpm/php.ini
|
||||
- name: /etc/php/{{php_ver}}/fpm/php.ini
|
||||
- char: ;
|
||||
- regex: cgi\.fix\_pathinfo\=1
|
||||
|
||||
php_date.timezone={{ timezone }}:
|
||||
file.replace:
|
||||
- name: /etc/php/7.0/fpm/php.ini
|
||||
- name: /etc/php/{{php_ver}}/fpm/php.ini
|
||||
- append_if_not_found: True
|
||||
- pattern: \;date\.timezone.*
|
||||
- repl: date.timezone = {{ timezone }}
|
||||
{% else %}
|
||||
{% do salt.log.error('Could not determine php_ver; might need to re-run state') %}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
/var/www/html/index.html:
|
||||
file.managed:
|
||||
- user: root
|
||||
|
||||
Reference in New Issue
Block a user