Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

nginxinc/ansible-role-nginx-unit

Ansible Galaxy Molecule CI/CD License

👾 Help make the NGINX Unit Ansible role better by participating in our survey! 👾

Ansible NGINX Unit Role

This role installs NGINX Unit on your target host.

Note: This role is still in active development. There may be unidentified issues and the role variables may change as development continues.

Requirements

Ansible

  • This role is developed and tested with maintained versions of Ansible base. When using Ansible base, you will also need to install the following collections:
    ---
    collections:
      - name: community.general
        version: 2.0.0
      - name: ansible.posix
        version: 1.1.1
    Note: You can alternatively install the Ansible community distribution if you don't want to manage individual collections.
  • Instructions on how to install Ansible can be found in the Ansible website.

Molecule

  • Molecule 3.x is used to test the various functionalities of the role.
  • Instructions on how to install Molecule can be found in the Molecule website.

Installation

Ansible Galaxy

Use ansible-galaxy install nginxinc.nginx_unit to install the latest stable release of the role on your system.

Git

Use git clone https://github.com/nginxinc/ansible-role-nginx-unit.git to pull the latest edge commit of the role from GitHub.

Platforms

The NGINX Ansible role supports all platforms supported by NGINX Unit:

Amazon Linux:
  versions:
    - 2018.03
Amazon Linux 2:
  versions:
    - any
CentOS:
  versions:
    - 6
    - 7
    - 8
Debian:
  versions:
    - stretch
    - buster
RedHat:
  versions:
    - 6
    - 7
    - 8
Ubuntu:
  versions:
    - xenial
    - bionic
    - focal

Role Variables

This role has multiple variables. The descriptions and defaults for all these variables can be found in the defaults/main/ folder in the following files:

Name Description
defaults/main/main.yml NGINX Unit installation variables
defaults/main/selinux.yml NGINX Unit SELinux variables
defaults/main/bsd.yml BSD specific installation variables

Example Playbooks

A working functional playbook example can be found in the molecule/common/playbooks folder in the following file:

Name Description
molecule/common/playbooks/default_converge.yml Install NGINX Unit

Do note that if you install this repository via Ansible Galaxy, you will have to replace the role variable in the sample playbooks from ansible-role-nginx-unit to nginxinc.nginx_unit.

Other NGINX Ansible Collections and Roles

You can find the Ansible NGINX Core collection of roles to install and configure NGINX Open Source, NGINX Plus, and NGINX App Protect here.

You can find the Ansible NGINX role to install NGINX here.

You can find the Ansible NGINX configuration role to configure NGINX here.

You can find the Ansible NGINX App Protect role to install and configure NGINX App Protect here.

You can find the Ansible NGINX Controller collection of roles to install and configure NGINX Controller here.

License

Apache License, Version 2.0

Author Information

Alessandro Fael Garcia

© F5 Networks, Inc. 2020