Ansible role to install, configure and launch Nginx.
It is part of anarres, a playbook that uses a collection of roles to deploy a full-featured server. But it can be used and tested independently.
It deploys a “Hello world!” default page and a robots.txt file disallowing all bots from /.
Since this repository has git submodules, after cloning the repository you'll have to
git submodule init
git submodule updateAlternatively you can clone it using
git clone --recurse-submodules -j8 {repo_url}These are the tested GNU/Linux distributions. Maybe it works on some other distributions too or just requieres a few changes.
In your local machine:
pip install -r requirements.txtdomain: Domain name for the server.nginx_processes: Defines the number ofnginxworker processes.web_ports_http: Web port fornginxto bind to for HTTP connections.web_ports_https: Web port fornginxto bind to for HTTPS connections.web_path: Base webs path.web_path_letsencrypt: Web path for letsencrypt, used to store ACME verification files.web_path_default: Default web path.
sudo and python in the target host(s).
- anarres/anarres_letsencrypt which is included as a submodule of this role.
- hosts: all
roles:
- anarres_common
- anarres_sec
- anarres_letsencrypt
- anarres_nginxTo test the role you need molecule,
vagrant, virtualbox and some python requirements that can be installed wwith
pip install -r requirements-dev.txt.
molecule testor
make testThere is more documentation about the installation and configuration of the required tools at Testing - Anarres documentation.
GPLv3
- m0wer: m0wer (at) autistici (dot) org