/ansible_collection_nginx_controller

Collection of NGINX Controller Roles for Ansible

Apache License 2.0Apache-2.0

Ansible Collection - nginx.nginx_controller

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

This collection contains all the roles maintained to support NGINX Controller 3.0 and later. The collection can be found on Ansible Galaxy.

It includes:

Ansible Galaxy GitHub
nginxinc.nginx_controller_install ansible-role-nginx-controller-install
molecule workflow
nginxinc.nginx_controller_license ansible-role-nginx-controller-license
molecule workflow
nginxinc.nginx_controller_generate_token ansible-role-nginx-controller-generate-token
molecule workflow
nginxinc.nginx_controller_agent ansible-role-nginx-controller-agent
molecule workflow
nginxinc.nginx_controller_certificate ansible-role-nginx-controller-certificate
molecule workflow
nginxinc.nginx_controller_gateway ansible-role-nginx-controller-gateway
molecule workflow
nginxinc.nginx_controller_application ansible-role-nginx_controller_application
molecule workflow
nginxinc.nginx_controller_component ansible-role-nginx-controller-component
molecule workflow
nginxinc.nginx_controller_location ansible-role-nginx_controller_location
molecule workflow
nginxinc.nginx_controller_environment ansible-role-nginx_controller_environment
molecule workflow
nginxinc.nginx_controller_user ansible-role-nginx_controller_user
molecule workflow
nginxinc.nginx_controller_user_role ansible-role-nginx_controller_user_role
molecule workflow
nginxinc.ansible_role_nginx_controller_api_definition_import ansible-role-nginx_controller_api_definition_import
molecule workflow
nginxinc.ansible_role_nginx_controller_publish_api ansible-role-nginx_controller_publish_api
molecule workflow
nginxinc.nginx ansible-role-nginx
molecule workflow

Experimental roles not yet published to Galaxy:

GitHub
ansible-role-nginx_controller_integration
ansible-role-nginx_controller_forwarder

Use guidelines

Install this collection locally:

ansible-galaxy collection install nginxinc.nginx_controller -p ./collections

Then you can use the roles from the collection in your playbooks / plays:

---
- hosts: nginx_instances

    collections:
    - nginxinc.nginx_controller

    roles:
    - role: nginx
        vars:
        nginx_enable: true
        nginx_start: true
        nginx_type: plus

    - role: nginx_controller_generate_token
        vars:
          nginx_controller_fqdn: controller.example.local
          nginx_controller_user_email: user@example.local
          nginx_controller_user_password: Secur3P@ssw0rd

    - role: nginx_controller_agent
        vars:
          nginx_controller_fqdn: controller.example.local

It is possible to be more explicit. For example a fully-qualified role name such as nginxinc.nginx_controller.nginx instead of nginx is helpful if you maintain a different nginx role on your local workstation at a different local path.

Reference the Collection at the start of a playbook:

---
- hosts: localhost
  gather_facts: no
  collections:
  - nginxinc.nginx_controller

  tasks:
  - name: load the vars.yaml 
    include_vars: "{{ playbook_dir }}/vars.yaml"

Using requirements.yaml

/collections/requirements.yml

---
collections:
- name: nginxinc.nginx_controller
  #version: 3.3.1

Author

Brian Ehlert

Daniel Edgar