Skip to content

crushlovely/ansible-nginx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role For NGINX

[Build Status Current Version

This Ansible role that installs nginx and its dependencies:

  • libpcre3
  • libpcre3-dev
  • libgd2-xpm-dev
  • libgeoip-dev
  • libpam0g-dev
  • zlibc
  • zlib1g
  • zlib1g-dev

This role requires self-signed certs placed in files/ssl or third-party certs placed in {{ app_name }}/files/ssl/ (found in the root of the ansible roles directory). This role also has the option to install Nginx with the passenger module.

Installation

$ ansible-galaxy install crushlovely.nginx, v1.0.0

Variables

app_name: **name of your app**
nginx:
  version: 1.6.2
  upstream_port: 8080
  domains:
    - "domain.com"

Usage

Once this role is installed on your system, include it in the roles list of your playbook.

- hosts: localhost
  roles:
    - { role: crushlovely.nginx, nginx.ssl: 'true', nginx.passenger: 'true', nginx.custom: 'true' }

You can also add a vars folder to your project folder and have your variables served by adding them to a file and calling it in your playbook.

- hosts: localhost
...
  vars_files:
    - vars/default_vars.yml
...

Dependencies

None

License

MIT