nginx_project

Nginx-project for ansible

Integration Quality Downloads Role

This is a base for all practical-ansible nginx roles. It does only initial configuration, like create working directory for the project and obtain SSL certificate. Try other roles that depend on this one:

Features

  • Creates living space for the project on your server
  • Obtains Let's Encrypt SSL certificate
  • Configures Nginx to display a simple static HTML page
  • Ready to be extended - does not overwrite nginx configuration

Prerequisities

  • Target user with rights to config nginx

Install

ansible-galaxy install practical-ansible.nginx_project

Reference manual

Base library for other Practical Ansible projects

Table of content


Default Variables

admin_email

E-mail address of the project manager. Used by Let's encrypt as a account

Default value

admin_email: ''

group

Unix group name that runs the project on target machine.

Default value

group: www-data

present

Deploy or undeploy the project. Available values: 'present', 'disabled', 'absent'

Example usage

state: disabled

project_environment

Name of the project environment. The role expects that you host multiple instances of the application on one machine. The usual names are just "production" and "staging", but it can be anything as long as you keep it UNIX path friendly.

Default value

project_environment: production

project_name

Name of the project used to reference the project on host file system. Role will attempt to read this from package manager metadata, like npm.

Default value

project_name: ''

Example usage

project_name: 'my-app'

project_version

Version of the project we are deploying

Default value

project_version: ''

Example usage

project_version: '1.1.0'
project_version: '2'

projects_directory

Directory where you usually put projects on the target machine

Default value

projects_directory: /var/lib/practical-ansible

server_names

List of hostnames used by the application. All of these will be proxied to the application.

Default value

server_names: ''

Example usage

server_names: 'mysite.example.com,mysite.example.cz'

ssl_sign_by

Authority signing the SSL certificate for the application. Can be one of: 'letsencrypt', 'self'

Default value

ssl_sign_by: letsencrypt

state

Default value

state: present

use_ssl

Configure nginx to use SSL when proxying requests to the docker configuration.

Default value

use_ssl: true

Example usage

use_ssl: false

user

User name that runs the project on target machine.

Default value

user: www-data

Dependencies

None.

License

MIT

Author

Pavel Žák

About

Base library for other Practical Ansible projects

Install
ansible-galaxy install practical-ansible/nginx_project
GitHub repository
License
mit
Downloads
636
Owner
Tiny Ansible roles and playbooks that help you with web hosting in a world of VPS