console_user – Manage the list of users for an Fabric operations console
Synopsis
Add, update, and remove users for an instance of the Fabric operations console.
This module works with the IBM Support for Hyperledger Fabric software or the Hyperledger Fabric Open Source Stack running in a Red Hat OpenShift or Kubernetes cluster.
Parameters
- api_endpoint (required)
The URL for the Fabric operations console.
Type: str- api_authtype (required)
basic- Authenticate to the Fabric operations console using basic authentication. You must provide both a valid API key using api_key and API secret using api_secret.Type: str- api_key (required)
The API key for the Fabric operations console.
Type: str- api_secret
The API secret for the Fabric operations console.
Only required when api_authtype is
basic.Type: str- api_timeout
The timeout, in seconds, to use when interacting with the Fabric operations console.
Type: intDefault value:60- state
absent- A user matching the specified email will be removed from the IBM Blockchain Platform console.
present- Asserts that a user matching the specified email and configuration exists in the Fabric operations console. If no user matches the specified email, the user will be added to the Fabric operations console. If a user matches the specified email but the configuration does not match, then the user in the Fabric operations console will be updated.Type: strDefault value:presentThe email address of the user.
Type: str- roles
The roles for the user. A user must have one or more roles from the list of roles
reader,writer, andmanager.If you specify
manager, then the rolesreaderandwriterwill be automatically specified for you. If you specifywriter, then the rolereaderwill be automatically specified for you.Type: listElements: str
Examples
---
- name: Add a user with the manager role to the console
hyperledger.fabric_ansible_collection.console_user:
state: present
api_endpoint: https://console.example.org:32000
api_authtype: basic
api_key: xxxxxxxx
api_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
email: alice@example.org
roles:
- manager
- name: Add a user with the writer role to the console
hyperledger.fabric_ansible_collection.console_user:
state: present
api_endpoint: https://console.example.org:32000
api_authtype: basic
api_key: xxxxxxxx
api_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
email: bob@example.org
roles:
- writer
- name: Add a user with the reader role to the console
hyperledger.fabric_ansible_collection.console_user:
state: present
api_endpoint: https://console.example.org:32000
api_authtype: basic
api_key: xxxxxxxx
api_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
email: charlie@example.org
roles:
- reader
- name: Remove the user from the console
hyperledger.fabric_ansible_collectionble-collection.console_user:
state: absent
api_endpoint: https://console.example.org:32000
api_authtype: basic
api_key: xxxxxxxx
api_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
email: alice@example.org
Return Values
- console_user
The user.
Returned: when state ispresentType: dict
- uuid
The UUID of the user.
Type: strSample:7ea7d413-d718-4138-9c25-3712fb5d7d0fThe email address of the user.
Type: strSample:alice@example.org- roles
The roles assigned to the user.
Type: listElements: strSample:manager