Add defaults to nginx role
This commit is contained in:
parent
9923228e7f
commit
4e9d6e0f0f
|
@ -1,2 +1,7 @@
|
|||
---
|
||||
# defaults file for /etc/ansible/roles/nginx
|
||||
#
|
||||
domain_name: "localhost"
|
||||
nginx_root_dir: "/var/www/html/"
|
||||
index_files: "index.html index.htm"
|
||||
|
||||
|
|
|
@ -11,11 +11,11 @@ http {
|
|||
server {
|
||||
listen 80;
|
||||
server_tokens off;
|
||||
server_name localhost;
|
||||
server_name {{ domain_name }};
|
||||
|
||||
location / {
|
||||
root /var/www/html;
|
||||
index index.html index.htm;
|
||||
root {{ nginx_root_dir }};
|
||||
index {{ index_files }};
|
||||
}
|
||||
|
||||
# Uncomment to pass for SSL
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
- name: Copy nginx configuration file
|
||||
copy: src=files/nginx.conf dest=/etc/nginx/nginx.conf
|
||||
template: src=files/nginx.conf dest=/etc/nginx/nginx.conf
|
||||
- name: Copy index.html file
|
||||
copy: src=files/index.html dest=/var/www/html
|
||||
template: src=files/index.html dest=/var/www/html
|
||||
notify:
|
||||
- restart nginx
|
||||
|
|
Loading…
Reference in New Issue