viasite-ansible.nginx-vhosts

Ansible Role: Nginx vhosts

Purpose

This role is part of viasite-ansible.site and helps speed up setting up websites.

It is a simplified version of jdauphant.nginx. Before using this role, you need to set up jdauphant.nginx on your server.

On my computer, the setup time for one site went from 48 seconds (when skipping some tags) to just 7 seconds.

Features

  • Add new sites
  • Remove existing sites

More features are available in the complete jdauphant.nginx role.

Usage

Check jdauphant's documentation for more details.

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
Informazioni sul progetto

Nginx sites manage

Installa
ansible-galaxy install viasite-ansible.nginx-vhosts
Licenza
Unknown
Download
877
Proprietario