Compare commits
No commits in common. "8938feba0c119e8ad2bc16b75cf2dc4e72e8b369" and "29c2b9b4dff859fa67a1e249c86d3060594a4af0" have entirely different histories.
8938feba0c
...
29c2b9b4df
@ -9,14 +9,15 @@ import argparse
|
||||
|
||||
from urlparse import urljoin
|
||||
|
||||
PATTERN = re.compile(r"(\S+) (joined|left) the game")
|
||||
|
||||
PATTERNS = (
|
||||
#(re.compile(r": (\S+)\[.+logged in"), "{0} joined the game"),
|
||||
(re.compile(r": (\S+)\[.+logged in"), "{0} joined the game"),
|
||||
(re.compile(r"(\S+) (joined|left) the game"), "{0} {1} the game"),
|
||||
(re.compile(r"\[(\S+): Gave (\d+) \[(.+)\] to (\S+)\]"), ":police_officer: {0} gave {1} \"{2}\" to {3}"),
|
||||
(re.compile(r"\[(\S+): Gave (\d+) \[(.+)\] to (\S+)\]"), "{0} gave {1} \"{2}\" to {3}"),
|
||||
(re.compile(r"(\S+) was (\S+) by (\S+)"), ":skull: {0} was {1} by {2}"),
|
||||
(re.compile(r"(\S+) tried to swim in lava"), ":skull: {0} tried to swim in lava"),
|
||||
(re.compile(r"(\S+) fell from a high place"), ":skull: {0} fell from a high place"),
|
||||
(re.compile(r"\[(\S+): Set own game mode to (.+) Mode\]"), ":police_officer: {0} set game mode to '{1}' mode"),
|
||||
)
|
||||
|
||||
|
||||
|
@ -9,7 +9,6 @@ nginx_service_enabled: yes
|
||||
nginx_etc_path: /etc/nginx
|
||||
nginx_conf_d_path: "{{ nginx_etc_path }}/conf.d"
|
||||
nginx_mime_types_path: "{{ nginx_etc_path }}/mime.types"
|
||||
nginx_var_log_path: /var/log/nginx
|
||||
|
||||
nginx_user: nginx
|
||||
nginx_worker_processes: auto
|
||||
@ -32,4 +31,3 @@ nginx_acme_challenge_enabled: yes
|
||||
nginx_acme_challenge_path: /var/www/.acme-challenge
|
||||
|
||||
nginx_conf_d: {}
|
||||
nginx_vhosts: []
|
||||
|
@ -45,10 +45,6 @@
|
||||
mode: 0644
|
||||
notify: reload nginx
|
||||
|
||||
- name: configure virtual hosts
|
||||
include_tasks: vhost.yaml
|
||||
loop: "{{ nginx_vhosts | dict2items }}"
|
||||
|
||||
- name: manage service
|
||||
service:
|
||||
name: "{{ nginx_service_name }}"
|
||||
|
@ -1,20 +0,0 @@
|
||||
---
|
||||
- name: configure virtual hosts
|
||||
block:
|
||||
- name: create webroot
|
||||
file:
|
||||
path: "{{ vhost.root }}"
|
||||
state: directory
|
||||
loop: "{{ item.value }}"
|
||||
loop_control:
|
||||
loop_var: vhost
|
||||
|
||||
- name: configure virtual host
|
||||
template:
|
||||
src: vhost.conf.j2
|
||||
dest: "{{ nginx_conf_d_path }}/{{ item.key }}.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0444
|
||||
notify: reload nginx
|
||||
loop: "{{ nginx_vhosts | dict2items }}"
|
@ -16,8 +16,8 @@ http {
|
||||
include {{ nginx_mime_types_path }};
|
||||
default_type {{ nginx_default_type }};
|
||||
|
||||
log_format main '$server_name $remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent $request_time "$http_referer" '
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log {{ nginx_access_log }};
|
||||
|
@ -1,42 +0,0 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
{% for vhost in item.value %}
|
||||
server {
|
||||
{% if vhost.listen is defined %}
|
||||
{% for listen in vhost.listen %}
|
||||
listen {{ listen }};
|
||||
{% endfor %}
|
||||
|
||||
{% if vhost.server_name is defined %}
|
||||
server_name {{ vhost.server_name }};
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
access_log {{ vhost.access_log | default(nginx_var_log_path + '/' + vhost.server_name + '.access.log main') }};
|
||||
error_log {{ vhost.error_log | default(nginx_var_log_path + '/' + vhost.server_name + '.error.log warn') }};
|
||||
|
||||
{% if vhost.root is defined %}
|
||||
root {{ vhost.root }};
|
||||
{% endif %}
|
||||
|
||||
index {{ vhost.index | default('index.html index.htm') }};
|
||||
|
||||
{% if vhost.ssl_certificate is defined %}
|
||||
ssl_certificate {{ vhost.ssl_certificate }};
|
||||
{% endif %}
|
||||
{% if vhost.ssl_certificate_key is defined %}
|
||||
ssl_certificate_key {{ vhost.ssl_certificate_key }};
|
||||
{% endif %}
|
||||
{% if vhost.ssl_dhparam is defined %}
|
||||
ssl_dhparam {{ vhost.ssl_dhparam }};
|
||||
{% endif %}
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root {{ nginx_root }};
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
{% if vhost.raw is defined %}
|
||||
{{ vhost.raw | indent(4) }}
|
||||
{% endif %}
|
||||
}
|
||||
{% endfor %}
|
Loading…
Reference in New Issue
Block a user