mirror of
https://github.com/HanXHX/ansible-nginx.git
synced 2026-04-15 13:12:10 +07:00
Merge branch 'master' into debian_11
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
- cron
|
||||
- curl
|
||||
- daemonize
|
||||
- fcgiwrap
|
||||
- jq
|
||||
- nghttp2
|
||||
- strace
|
||||
@@ -40,11 +39,6 @@
|
||||
changed_when: false
|
||||
register: cur_php_version
|
||||
|
||||
- name: SERVICE | Force start fcgiwrap
|
||||
service:
|
||||
name: "fcgiwrap"
|
||||
state: started
|
||||
|
||||
# Bypasses Ansible+Docker issue. With service module... php is not really started!
|
||||
- name: COMMAND | Force start PHP
|
||||
command: "service php{{ cur_php_version.stdout }}-fpm start"
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
register: sf
|
||||
loop:
|
||||
- php-fpm
|
||||
- fcgiwrap
|
||||
|
||||
- name: STAT | Check ports
|
||||
stat:
|
||||
|
||||
16
tests/templates/custom_template.conf.j2
Normal file
16
tests/templates/custom_template.conf.j2
Normal file
@@ -0,0 +1,16 @@
|
||||
# {{ ansible_managed }} - custom template
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen 8888 http2;
|
||||
listen 9999 http2 proxy_protocol;
|
||||
server_name {{ item.name }};
|
||||
|
||||
index index.html index.htm;
|
||||
|
||||
root {{ item.root }};
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
@@ -289,6 +289,9 @@
|
||||
ssl_name: '{{ ngrok.stdout }}'
|
||||
headers:
|
||||
'X-acme': '1'
|
||||
- name: 'test-custom-template.local'
|
||||
custom_template: 'templates/custom_template.conf.j2'
|
||||
root: '/tmp/custom-template'
|
||||
|
||||
nginx_php: "{{ [{'upstream_name': 'manual', 'sockets': [{'host': '127.0.0.1', 'port': '9636' }] }] }}"
|
||||
nginx_dh_length: 1024
|
||||
@@ -316,6 +319,14 @@
|
||||
- 'test-php-index.local'
|
||||
- 'test-php-index2.local'
|
||||
|
||||
- name: -- Add Directories --
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
loop:
|
||||
- "{{ nginx_root }}/test-htpasswd.local/public/hello"
|
||||
- "/tmp/custom-template"
|
||||
|
||||
- name: -- Add HTML file --
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ item }}/index.html"
|
||||
|
||||
Reference in New Issue
Block a user