sensu.sensu_go.cluster_role_binding (0.9.0) — module

Manages Sensu cluster role bindings

Authors: Paul Arthur (@flowerysong), Manca Bizjak (@mancabizjak), Aljaz Kosir (@aljazkosir), Tadej Borovsak (@tadeboro)

preview | supported by XLAB Steampunk

Install collection

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


Add to requirements.yml

  collections:
    - name: sensu.sensu_go
      version: 0.9.0

Description

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

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a cluster role binding
  cluster_role_binding:
    name: all-cluster-admins
    cluster_role: cluster-admin
    groups:
        - cluster-admins
    users:
      - alice

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

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

users:
    description:
    - List of users to bind to the cluster role
    - Note that at least one of 'users' and 'groups' must be specified when creating a
      cluster role binding.
    type: list

groups:
    description:
    - List of groups to bind to the cluster role
    - Note that at least one of 'users' and 'groups' must be specified when creating a
      cluster role binding.
    type: list

cluster_role:
    description:
    - Name of the cluster role
    type: str

Outputs

object:
  description: object representing Sensu cluster role binding
  returned: success
  type: dict