hyperledger_labs / hyperledger_labs.fabric_ansible_collection / 2.0.0 / module / console_user Manage the list of users for an Fabric operations console Authors: Simon Stone (@sstone1) preview | supported by communityhyperledger_labs.fabric_ansible_collection.console_user (2.0.0) — module
Install with ansible-galaxy collection install hyperledger_labs.fabric_ansible_collection:==2.0.0
collections: - name: hyperledger_labs.fabric_ansible_collection version: 2.0.0
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.
--- - 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
email: description: - The email address of the user. type: str roles: description: - The roles for the user. A user must have one or more roles from the list of roles C(reader), C(writer), and C(manager). - If you specify C(manager), then the roles C(reader) and C(writer) will be automatically specified for you. If you specify C(writer), then the role C(reader) will be automatically specified for you. elements: str type: list state: choices: - absent - present default: present description: - C(absent) - A user matching the specified email will be removed from the IBM Blockchain Platform console. - C(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: str api_key: description: - The API key for the Fabric operations console. required: true type: str api_secret: description: - The API secret for the Fabric operations console. - Only required when I(api_authtype) is C(basic). type: str api_timeout: default: 60 description: - The timeout, in seconds, to use when interacting with the Fabric operations console. type: int api_authtype: description: - C(basic) - Authenticate to the Fabric operations console using basic authentication. You must provide both a valid API key using I(api_key) and API secret using I(api_secret). required: true type: str api_endpoint: description: - The URL for the Fabric operations console. required: true type: str
console_user: contains: email: description: - The email address of the user. sample: alice@example.org type: str roles: description: - The roles assigned to the user. elements: str sample: manager type: list uuid: description: - The UUID of the user. sample: 7ea7d413-d718-4138-9c25-3712fb5d7d0f type: str description: - The user. returned: when I(state) is C(present) type: dict