Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

nginxinc/ansible-role-nginx_controller_application

NGINX Controller Application

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

Define an application with NGINX Controller to hold components that describe the behavior to the upstream workload group(s).

Requirements

NGINX Controller

Role Variables

Required Variables

controller.fqdn - FQDN of the NGINX Controller instance

controller.auth_token - Authentication token for NGINX Controller

environmentName - Environment the component is associated with

application.metadata.name - Name of the application

Template Variables

This role has multiple template related variables. The descriptions and defaults for all these variables can be found in vars/main.yml

Dependencies

Example Playbook

To use this role you can create a playbook such as the following (let's name it nginx_controller_application.yaml for the purposes of this example).

- hosts: localhost
  gather_facts: no

  vars:
    nginx_controller_user_email: "user@example.com"
    nginx_controller_user_password: "mySecurePassword"
    nginx_controller_fqdn: "controller.mydomain.com"
    nginx_controller_validate_certs: false

  tasks:
    - name: Retrieve the NGINX Controller auth token
      include_role:
        name: nginxinc.nginx_controller_generate_token

    - name: Configure the application
      include_role:
        name: nginxinc.nginx_controller_application
      vars:
        nginx_controller_environmentName: "production-us-west"
        nginx_controller_app:
          metadata:
            name: "trading.acmefinancial.net"
            displayName: "Trading.ACMEFinancial.net"
            description: "Core Trading Application"

You can then run ansible-playbook nginx_controller_application.yaml to execute the playbook.

Alternatively, you can also pass/override any variables at run time using the --extra-vars or -e flag like so ansible-playbook nginx_controller_application.yaml -e "nginx_controller_user_email=user@company.com nginx_controller_user_password=notsecure nginx_controller_fqdn=controller.example.local nginx_controller_validate_certs=false"

You can also pass/override any variables by passing a yaml file containing any number of variables like so ansible-playbook nginx_controller_application.yaml -e "@nginx_controller_application_vars.yaml"

License

Apache License, Version 2.0

Author Information

Brian Ehlert

© NGINX, Inc. 2020

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages