mirror of
https://github.com/HanXHX/ansible-nginx.git
synced 2026-04-09 12:42:10 +07:00
Drop PHP version support (useless) + fix some bugs
This commit is contained in:
@@ -1,34 +1,5 @@
|
||||
---
|
||||
|
||||
- block:
|
||||
|
||||
- name: SET_FACT | temp
|
||||
set_fact:
|
||||
tmp_fpm_pool: |
|
||||
[
|
||||
{% for p in ansible_local.hanxhx_php.fpm_pool %}
|
||||
{
|
||||
"upstream_name": "{{ p.name }}",
|
||||
"sockets": [{
|
||||
{% if p.listen.startswith('/') %}
|
||||
"unix": "{{ p.listen }}"
|
||||
{% else %}
|
||||
{% set host = p.listen.split(":")[0] %}
|
||||
{% set port = p.listen.split(":")[1] %}
|
||||
"host": "{{ host }}",
|
||||
"port": "{{ port }}"
|
||||
{% endif %}
|
||||
}]
|
||||
}{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
]
|
||||
|
||||
- name: SET_FACT | new php
|
||||
set_fact:
|
||||
nginx_php: "{{ nginx_php + tmp_fpm_pool }}"
|
||||
|
||||
when: ansible_local.hanxhx_php.fpm_pool is defined
|
||||
|
||||
- name: TEMPLATE | Deploy PHP upstream to Nginx
|
||||
template:
|
||||
src: "etc/nginx/conf.d/php.conf.j2"
|
||||
|
||||
Reference in New Issue
Block a user