sensu / sensu.sensu_go / 0.7.6 / module / role Manages Sensu roles Authors: Paul Arthur (@flowerysong), Manca Bizjak (@mancabizjak), Aljaz Kosir (@aljazkosir), Tadej Borovsak (@tadeboro) preview | supported by XLAB Steampunksensu.sensu_go.role (0.7.6) — module
Install with ansible-galaxy collection install sensu.sensu_go:==0.7.6
collections: - name: sensu.sensu_go version: 0.7.6
For more information, refer to the Sensu documentation at U(https://docs.sensu.io/sensu-go/latest/reference/rbac/)
- name: Create a role role: name: readonly rules: - verbs: - get - list resources: - checks - entities
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 rules: description: - Rules that the role applies. required: true suboptions: resource_names: description: - Names of specific resources the rule has permission to access. - Note that for the 'create' verb, this argument will not be taken into account when enforcing RBAC, even if it is provided. type: list resources: description: - Types of resources the rule has permission to access. required: true type: list verbs: choices: - get - list - create - update - delete description: - Permissions to be applied by the rule. required: true type: list type: list state: choices: - present - absent default: present description: - Target state of the Sensu object. type: str
object: description: object representing Sensu role returned: success type: dict