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
 | 
					# 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 {
 | 
					  server {
 | 
				
			||||||
    listen 80;
 | 
					    listen 80;
 | 
				
			||||||
    server_tokens off;
 | 
					    server_tokens off;
 | 
				
			||||||
    server_name localhost;
 | 
					    server_name {{ domain_name }};
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    location / {
 | 
					    location / {
 | 
				
			||||||
      root /var/www/html;
 | 
					      root {{ nginx_root_dir }};
 | 
				
			||||||
      index index.html index.htm;
 | 
					      index {{ index_files }};
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    # Uncomment to pass for SSL
 | 
					    # Uncomment to pass for SSL
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
---
 | 
					---
 | 
				
			||||||
- name: Copy nginx configuration file
 | 
					- 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
 | 
					- name: Copy index.html file
 | 
				
			||||||
  copy: src=files/index.html dest=/var/www/html
 | 
					  template: src=files/index.html dest=/var/www/html
 | 
				
			||||||
  notify:
 | 
					  notify:
 | 
				
			||||||
    - restart nginx
 | 
					    - restart nginx
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user