All Projects → nginxinc → ansible-role-nginx-config

nginxinc / ansible-role-nginx-config

Licence: Apache-2.0 license
Ansible role for configuring NGINX

Programming Languages

Jinja
831 projects
HTML
75241 projects

Projects that are alternatives of or similar to ansible-role-nginx-config

ansible-role-github-users
Ansible Role - GitHub Users
Stars: ✭ 49 (-52.88%)
Mutual labels:  ansible-role
monit
Ansible role that configures monit. Will also setup baseline monitoring of SSH, NTP, and Cron.
Stars: ✭ 37 (-64.42%)
Mutual labels:  ansible-role
ansible-aide
An Ansible role to install, configure, and schedule AIDE.
Stars: ✭ 14 (-86.54%)
Mutual labels:  ansible-role
ansible-resolv
Ansible role to configure /etc/resolv.conf
Stars: ✭ 44 (-57.69%)
Mutual labels:  ansible-role
ansible-backup
Ansible daily backup role
Stars: ✭ 25 (-75.96%)
Mutual labels:  ansible-role
ansible-role-harden-linux
Ansible role for hardening Linux
Stars: ✭ 99 (-4.81%)
Mutual labels:  ansible-role
ansible-cloudflared
Install cloudflared and systemd service for DNS-Over-HTTPS
Stars: ✭ 18 (-82.69%)
Mutual labels:  ansible-role
ansible-role-yarn
Ansible Role - YARN Package Manager for Ubuntu/RHEL/CentOS https://galaxy.ansible.com/ocha/yarn/
Stars: ✭ 27 (-74.04%)
Mutual labels:  ansible-role
ansible-role-systemd-service
No description or website provided.
Stars: ✭ 37 (-64.42%)
Mutual labels:  ansible-role
ansible-concourse
An ansible role to manage Concourse CI
Stars: ✭ 22 (-78.85%)
Mutual labels:  ansible-role
PrometheusWithGrafana
Setup Prometheus with Grafana dashboard using Ansible
Stars: ✭ 50 (-51.92%)
Mutual labels:  ansible-role
ansible-role-auditbeat
Ansible role to install auditbeat for security monitoring. (Ruleset included)
Stars: ✭ 15 (-85.58%)
Mutual labels:  ansible-role
ansible-qemu-kvm
Ansible role to provision KVM/QEMU virtual machines
Stars: ✭ 38 (-63.46%)
Mutual labels:  ansible-role
ansible-role-cardano-node
Ansible role for the provisioning of Shelly Cardano binaries from source.
Stars: ✭ 20 (-80.77%)
Mutual labels:  ansible-role
ansible-palybooks
Ansible Palybooks Written and Published by www.server-computer.com. NO WARRANTY for any damages and loss of data.
Stars: ✭ 24 (-76.92%)
Mutual labels:  ansible-role
RHEL8-STIG
Ansible role for Red Hat 8 STIG Baseline
Stars: ✭ 73 (-29.81%)
Mutual labels:  ansible-role
ansible-role-aptly
Install aptly debian respository manager and enable the REST API
Stars: ✭ 37 (-64.42%)
Mutual labels:  ansible-role
ansible-roles
My Ansible roles for Debian/Ubuntu
Stars: ✭ 57 (-45.19%)
Mutual labels:  ansible-role
ansible-playbook-volumio-bluetooth
Pair your phone and stream audio to a Raspberry Pi running Volumio
Stars: ✭ 13 (-87.5%)
Mutual labels:  ansible-role
ansible-role-asdf
No description or website provided.
Stars: ✭ 45 (-56.73%)
Mutual labels:  ansible-role

Ansible Galaxy Molecule CI/CD License

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

Ansible NGINX Configuration Role

This role configures NGINX Open Source and NGINX Plus 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 core (above 2.12).

  • When using Ansible core, you will also need to install the following collections:

    ---
    collections:
      - name: ansible.posix
        version: 1.4.0
      - name: community.general
        version: 5.5.0
      - name: community.docker # Only required if you plan to use Molecule (see below)
        version: 3.1.0

    Note: You can alternatively install the Ansible community distribution (what is known as the "old" Ansible) if you don't want to manage individual collections.

  • Instructions on how to install Ansible can be found in the Ansible website.

Jinja2

  • This role uses Jinja2 templates. Ansible core installs Jinja2 by default, but depending on your install and/or upgrade path, you might be running an outdated version of Jinja2. The minimum version of Jinja2 required for the role to properly function is 2.11.
  • Instructions on how to install Jinja2 can be found in the Jinja2 website.

Molecule (Optional)

  • Molecule is used to test the various functionalities of the role. The recommended version of Molecule to test this role is 3.3.
  • Instructions on how to install Molecule can be found in the Molecule website. You will also need to install the Molecule Docker driver.
  • To run the NGINX Plus/App Protect config Molecule tests, you must copy your NGINX Plus/App Protect license to the role's files/license folder.

You can alternatively add your NGINX Plus/App Protect repository certificate and key to the local environment. Run the following commands to export these files as base64-encoded variables and execute the Molecule tests:

export NGINX_CRT=$( cat <path to your certificate file> | base64 )
export NGINX_KEY=$( cat <path to your key file> | base64 )
molecule test -s plus

Installation

Ansible Galaxy

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

Git

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

Platforms

The NGINX config Ansible role supports all platforms supported by NGINX Open Source and NGINX Plus:

NGINX Open Source

AlmaLinux:
  - 8
  - 9
Alpine:
  - 3.14
  - 3.15
  - 3.16
  - 3.17
Amazon Linux:
  - 2
CentOS:
  - 7.4+
Debian:
  - bullseye (11)
Oracle Linux:
  - 7
  - 8
  - 9
Red Hat:
  - 7.4+
  - 8
  - 9
Rocky Linux:
  - 8
  - 9
SUSE/SLES:
  - 12
  - 15
Ubuntu:
  - bionic (18.04)
  - focal (20.04)
  - impish (21.10)
  - jammy (22.04)

NGINX Plus

AlmaLinux:
  - 8
  - 9
Alpine:
  - 3.13
  - 3.14
  - 3.15
  - 3.16
  - 3.17
Amazon Linux 2:
  - any
CentOS:
  - 7.4+
Debian:
  - bullseye (11)
FreeBSD:
  - 12.1+
  - 13
Oracle Linux:
  - 7.4+
Red Hat:
  - 7.4+
  - 8
  - 9
Rocky Linux:
  - 8
  - 9
SUSE/SLES:
  - 12
  - 15
Ubuntu:
  - bionic (18.04)
  - focal (20.04)
  - jammy (22.04)

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
main.yml NGINX simple config variables
selinux.yml Set up SELinux to allow the necessary connections to your NGINX setup
template.yml NGINX config template variables
upload.yml NGINX config/HTML/SSL upload variables

Example Playbooks

Working functional playbook examples can be found in the molecule/ folder in the following files:

Name Description
cleanup_module/converge.yml Cleanup an NGINX config and configure NGINX supported modules
default/converge.yml Use the NGINX config templating variables to create an NGINX config
plus/converge.yml Use the NGINX config templating variables to create an NGINX Plus config
stable_push/converge.yml Install NGINX using the stable branch and push a preexisting config from your system to your NGINX instance

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-config to nginxinc.nginx_config.

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 OSS and NGINX Plus here.

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

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

License

Apache License, Version 2.0

Author Information

Alessandro Fael Garcia

© F5, Inc. 2020 - 2023

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].