Installs and configures nginx.
This role has no dependencies.
To install run ansible-galaxy install sansible.nginx
or add this to your
roles.yml
- name: sansible.nginx
version: v3.0.1
and run ansible-galaxy install -p ./roles -r roles.yml
This role uses two tags: build and configure
build
- Installs Nginx.configure
- (re-)Configures Nginx.
To simply install Nginx:
- name: Install Nginx
hosts: sandbox
pre_tasks:
- name: Update apt
become: yes
apt:
cache_valid_time: 1800
update_cache: yes
tags:
- build
roles:
- role: sansible.nginx
The default access log format is in JSON, to use the standard txt format:
- name: Install Nginx
hosts: sandbox
pre_tasks:
- name: Update apt
become: yes
apt:
cache_valid_time: 1800
update_cache: yes
tags:
- build
roles:
- role: sansible.nginx
sansible_nginx_access_log_format: standard