Skip to content

angristan/ansible-nginx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible role for Nginx

This is a role I made for myself but I tried to make it as reusable as possible while keeping it fitted to my use.

The role will install Nginx from the official APT stable repository for Debian or Ubuntu.

It will do some basic configuration like:

  • Setting up nginx.conf
  • Setting up the logrotate
  • Setting up a default vhost
  • Seeting up vhosts trough variables.

All the variables are in defaults/main.yml.

Sample playbook

---

- hosts: myhost
  roles: nginx
  vars:
    nginx_server_tokens: 'off'
    nginx_logrotate_rotate: 7
    nginx_vhosts:
      - name: 'blog'
        hostname: 'domain.tld'
        template: 'blog.j2'

Releases

No releases published

Packages

No packages published