Official Ansible Galaxy NGINX Roles Out Now
NGINX has now created officially supported Ansible Roles for the open source NGINX software and NGINX Plus available on Ansible Galaxy. These Ansible Roles will be in continual development to support customer use cases.
Within Ansible, the automation engine for application deployment, a Playbook allows users to install and configure applications across multiple servers, environments, and operating systems, all from one central location. An Ansible Role, in turn, bundles Ansible variables
, tasks, and handlers into a clearly defined file structure. An Ansible Role can be dropped into an Ansible Playbook and immediately put to work.
You can find community-developed roles at Ansible Galaxy, a free site for sharing, finding, and downloading roles. Downloading roles from Ansible Galaxy is a great way to jumpstart your automation projects.
Installing the NGINX Ansible Galaxy Roles is very simple. To install the NGINX OSS role, type:
ansible-galaxy install nginxinc.nginx-oss
To install the NGINX Plus role, type:
ansible-galaxy install nginxinc.nginx-plus
Deploying NGINX OSS within a cloud provider can now be done with a simple Ansible Playbook:
---
- hosts: localhost
remote_user: root
become: true
roles:
- role: ansible-nginx-oss
You can also easily deploy NGINX OSS to a dynamic inventory containing the NGINX tag:
--
- hosts: tag_nginx
remote_user: root
become: true
roles:
- role: ansible-nginx-plus
Deploying NGINX Plus within a cloud provider requires you to define the location of your NGINX Plus license:
---
- hosts: localhost
remote_user: root
become: true
roles:
- role: ansible-nginx-plus
vars:
- certs: ~/certs/
Similarly, specify the location of your NGINX Plus license when deploying NGINX Plus within a dynamic inventory containing the NGINX tag:
---
- hosts: tag_nginx
remote_user: root
become: true
roles:
- role: ansible-nginx-plus
vars:
- certs: ~/certs/
Both Ansible Roles are available on GitHub. Feel free to contribute!
NGINX OSS: https://galaxy.ansible.com/nginxinc/nginx-oss/
NGINX Plus: https://galaxy.ansible.com/nginxinc/nginx-plus/
The post Official Ansible Galaxy NGINX Roles Out Now appeared first on NGINX.
Leave a Reply