Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/angristan/ansible-nginx

Ansible role for Nginx
https://github.com/angristan/ansible-nginx

ansible ansible-role debian nginx ubuntu

Last synced: 23 days ago
JSON representation

Ansible role for Nginx

Awesome Lists containing this project

README

        

# 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

```yaml
---

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