initial: create ansible role

This commit is contained in:
2022-08-01 10:22:00 +07:00
commit ab7a3ac46d
11 changed files with 165 additions and 0 deletions

28
templates/nginx.conf.j2 Normal file
View File

@@ -0,0 +1,28 @@
user {{ nginx_username }};
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
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 /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 4096;
include /etc/nginx/mime.types;
default_type application/octet-stream;
include /etc/nginx/conf.d/*.conf;
}

View File

@@ -0,0 +1,10 @@
server {
listen 80;
access_log /var/log/nginx/{{ lighthouse_access_log_name }}.log;
location / {
root {{ lighthouse_location }};
index index.html;
}
}