Giter Club home page Giter Club logo

ansible-role-nginx_controller_user_role's Introduction

NGINX Controller User Role

Manage custom user roles with NGINX Controller. The user role is how permissions are assigned to users. The user role defines the objects / endpoints within NGINX Controller that the user can interact with and what they can do with those objects. NGINX Controller includes three built-in Roles that cannot be modified: admin, user, and guest.

Requirements

NGINX Controller

Role Variables

Required Variables

controller.fqdn - FQDN of the NGINX Controller instance

controller.auth_token - Authentication token for NGINX Controller

nginx_controller_user_role.metadata.name - name of the Role

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_user_role.yaml for the purposes of this example).

- hosts: localhost
  gather_facts: no

  vars:
    nginx_controller_user_email: "[email protected]" # Required by nginx_controller_generate_token role
    nginx_controller_user_password: "mySecurePassword" # Required by nginx_controller_generate_token role
    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 user role
      include_role:
        name: nginxinc.nginx_controller_user_role
      vars:
        nginx_controller_user:
          metadata:
            name:  # the name of the user role
            displayName:   # a friendly display name for the user role (spaces and special characters allowed)
            description:  # a description of the user role
            tags:   # an array of tags
            - tagOne
            - tagTwo
          desiredState:
            permissions:  # an array of endpoints, objects, and the level of access
            -
              access: "READ"
              path: "/services/environments/development"
            -
              access: "WRITE"
              path: "/services/environments/test"

You can then run ansible-playbook nginx_controller_user_role.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_user_role.yaml -e "[email protected] 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_user_role.yaml -e "@nginx_controller_user_role_vars.yaml"

License

Apache License, Version 2.0

Author Information

Brian Ehlert

© NGINX, Inc. 2020

ansible-role-nginx_controller_user_role's People

Contributors

brianehlert avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.