Ansible enables NGINX users to quickly automate repetitive tasks across the app lifecycle. Therefore, NGINX has made a major investment in building out more Ansible roles and collections over the last five years.
NGINX’s Ansible history
Let’s have a look at the detail of NGINX’s Ansible history. In 2015, they published a blog describing how to create Ansible playbooks for installing NGINX and NGINX Plus. 2 years later, they launched its two first Ansible roles which separately performed the basic installation of NGINX and NGINX Plus.
In 2018, NGINX unified the two initial roles into a single nginx role to install both NGINX and NGINX Plus. In addition to this, the company enhanced the nginx role to configure NGINX, install NGINX Unit, and install NGINX Amplify. This year, NGINX released 16 new roles and a certified collection for NGINX Controller. They started the nginx_app_protect role to install and configure their new security solution, NGINX App Protect while releasing a second certified collection, NGINX Core.
Due to the feedback, the company decided to split up the nginx role into three separate roles to enable greater flexibility and speed:
- nginx – Installs NGINX and NGINX Plus
- nginx_config – Configures NGINX and NGINX Plus
- nginx_unit – Installs NGINX Unit
The NGINX Core Collection
Following the introduction of collections in Ansible 2.10, NGINX collection that focuses on software for fast and secure web serving, reverse proxy, and load balancing has been released. The NGINX Core collection has two roles for installing and configuring NGINX and NGINX Plus), plus the nginx_app_protect role for installing and configuring NGINX App Protect, a fully-featured WAF module for NGINX Plus.
To install the NGINX Core collection, you can run the command:
$ ansible-galaxy collection install nginxinc.nginx_core
Then you can then start using the collection’s roles in your playbooks by running the command:
--- - collections: - name: nginxinc.nginx_core version: 0.1.3
The NGINX Core collection includes a series of playbooks that cover many use cases. It is also possible to check the playbooks included in each role’s molecule directory to find up-to-date working examples for each role.
If you are an NGINX Open Source user, and used to manage NGINX Plus directly, also want to configure NGINX App Protect, or don’t use NGINX Controller, NGINX Core is convenient for you. If you are an NGINX Controller subscriber, you can choose NGINX Controller. Ansible Automation Platform subscribers can access certified NGINX collections on Ansible Automation Hub (in the nginxinc namespace). Alternatively, it is possible to find the upstream, community versions of NGINX’s roles and collections on Ansible Galaxy.
See more Software News