Files
salt-states/nginx/init.sls
2019-06-18 23:37:28 -04:00

44 lines
835 B
Plaintext

nginx:
pkg.installed:
- name: nginx-light
service.running:
- enable: True
- reload: True
{% if salt.pillar.get('use_php', True) %}
{% set timezone = salt.timezone.get_zone() %}
php-fpm:
pkg.installed: []
service.running:
- name: php7.0-fpm
- enable: True
- watch:
- file: php_cgi.fixpathinfo=1
- file: php_date.timezone={{ timezone }}
php_cgi.fixpathinfo=1:
file.uncomment:
- name: /etc/php/7.0/fpm/php.ini
- char: ;
- regex: cgi\.fix\_pathinfo\=1
php_date.timezone={{ timezone }}:
file.replace:
- name: /etc/php/7.0/fpm/php.ini
- append_if_not_found: True
- pattern: \;date\.timezone.*
- repl: date.timezone = {{ timezone }}
{% endif %}
/var/www/html/index.html:
file.managed:
- user: root
- group: root
- mode: 644
- contents: ''