sensu.sensu_go.sensu_go_rolebinding (0.7.6) — module

Manages Sensu role bindings

| "added in version" 0.1.0 of sensu.sensu_go"

Authors: Paul Arthur (@flowerysong)

preview | supported by community

Install collection

Install with ansible-galaxy collection install sensu.sensu_go:==0.7.6


Add to requirements.yml

  collections:
    - name: sensu.sensu_go
      version: 0.7.6

Description

For more information, refer to the Sensu documentation: U(https://docs.sensu.io/sensu-go/latest/reference/rbac/)

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Give admins global access
  sensu_go_rolebinding:
    name: admins-admin
    cluster: true
    role: cluster-admin
    groups:
      - admins
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Give nagios admins namespaced access
  sensu_go_rolebinding:
    name: nagios-admins-fence
    namespace: nagios
    cluster_role: true
    role: admin
    groups:
      - nagios-admins
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: A special role for a special boy
  sensu_go_rolebinding:
    name: nagios-ex-admins-fence
    namespace: nagios
    role: read-entities
    users:
      - brywilk

Inputs

    
auth:
    description:
    - Authentication parameters. Can define each of them with ENV as well.
    suboptions:
      namespace:
        default: default
        description:
        - RBAC namespace to operate in. If this is not set the value of the SENSU_NAMESPACE
          environment variable will be checked.
        type: str
      password:
        default: P@ssw0rd!
        description:
        - The Sensu user's password. If this is not set the value of the SENSU_PASSWORD
          environment variable will be checked.
        type: str
      url:
        default: http://localhost:8080
        description:
        - Location of the Sensu backend API. If this is not set the value of the SENSU_URL
          environment variable will be checked.
        type: str
      user:
        default: admin
        description:
        - The username to use for connecting to the Sensu API. If this is not set the
          value of the SENSU_USER environment variable will be checked.
        type: str
    type: dict

name:
    description:
    - The Sensu object's name.
    required: true
    type: str

role:
    description:
    - Role name
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Target state of the Sensu object.
    type: str

users:
    default: []
    description:
    - List of users to bind to the role
    type: list

groups:
    default: []
    description:
    - List of groups to bind to the role
    type: list

cluster:
    default: false
    description:
    - Operate against cluster role bindings instead of namespaced bindings
    type: bool

cluster_role:
    default: false
    description:
    - Use a cluster role in a namespaced binding (has no effect when cluster is true)
    type: bool