Skip to content

Manage nginx vhosts in separate files, for using with jdauphant.nginx

Notifications You must be signed in to change notification settings

viasite-ansible/ansible-role-nginx-vhosts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role: Nginx vhosts

Build Status

Purpose

I am using this role as part of viasite-ansible.site for speedup site provision.

This is stripped version of jdauphant.nginx. You must provision jdauphant.nginx to host before using this role.

On my machine provision of one site decreased from 48 seconds (with --skip-tags package) to 7 seconds.

Features

  • add sites
  • remove sites

Other features implemented in full jdauphant.nginx role.

Usage

See jdauphant's docs.

Example Playbook

- hosts: all
  roles:
    - viasite-ansible.nginx-vhosts
  vars:
    nginx_sites:
      foo:
        template: "site.conf.j2"
      bar:
        - listen 8080
        - server_name localhost
        - root "/tmp/site1"
        - location / { try_files $uri $uri/ /index.html; }
        - location /images/ { try_files $uri $uri/ /index.html; }
    nginx_remove_sites:
      - baz

About

Manage nginx vhosts in separate files, for using with jdauphant.nginx

Resources

Stars

Watchers

Forks

Packages

No packages published