GitHub - nginxinc/ansible_role_nginx_controller_generate_token (original) (raw)

Ansible NGINX Controller Generate Token Role

This repository has been archived. There will likely be no further development on the project and security vulnerabilities may be unaddressed.

A role to generate and return an authentication token for NGINX Controller for use in other Roles or within a playbook.

Requirements

NGINX Controller

A running NGINX Controller instance.

Ansible

Molecule (Optional)

Installation

Ansible Galaxy

Use ansible-galaxy install nginxinc.nginx_controller_generate_token to install the latest stable release of the role on your system. Alternatively, if you have already installed the role, use ansible-galaxy install -f nginxinc.nginx_controller_generate_token to update the role to the latest release.

Git

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

Platforms

The NGINX Controller generate token Ansible role supports all platforms that support Ansible 2.11, some of them being:

Alpine:

Role Variables

Variable Default Description Required
nginx_controller_user_email "" The email address of the NGINX Controller user Yes
nginx_controller_user_password "" The password of the NGINX Controller user Yes
nginx_controller_fqdn "" The FQDN of NGINX Controller Yes
nginx_controller_validate_certs false Whether NGINX Controller SSL cert should be validated or not No

In addition, this role returns the following variable:nginx_controller_auth_token - Authentication token used to authenticate to the NGINX Controller API.

Example Playbook

To use this role you can create a playbook such as the following:


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 configuration role to configure NGINX 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 Controller collection of roles to install and configure NGINX Controller 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

Brian Ehlert

Daniel Edgar

© F5 Networks, Inc. 2020 - 2021