hyperledger_labs / hyperledger_labs.fabric_ansible_collection / 2.0.0 / module / channel_policy Manage a policy for a Hyperledger Fabric channel Authors: Simon Stone (@sstone1) preview | supported by communityhyperledger_labs.fabric_ansible_collection.channel_policy (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 policies for a Hyperledger Fabric channel.
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 the policy to the channel hyperledger.fabric_ansible_collection.channel_policy: state: present name: Admins policy: admins-policy.json path: channel_config.bin
- name: Remove the policy to the channel hyperledger.fabric_ansible_collectionble-collection.channel_policy: state: absent name: Admins path: channel_config.bin
name: description: - The name of the policy to add, update, or remove from the channel. required: true type: str path: description: - Path to current the channel configuration file. - This file can be fetched by using the M(channel_config) module. - This file will be updated in place. You will need to keep a copy of the original file for computing the configuration update. required: true type: str state: choices: - absent - present default: present description: - C(absent) - An policy matching the specified name will be removed from the channel. - C(present) - Asserts that an policy matching the specified name and configuration exists in the channel. If no policy matches the specified name, the policy will be added to the channel. If an policy matches the specified name but the configuration does not match, then the policy in the channel will be updated. type: str policy: description: - The policy to add, update, or remove from the channel. - You can pass a string, which is a path to a JSON file containing a policy in the Hyperledger Fabric format (common.Policy). - You can also pass a dict, which must correspond to a parsed policy in the Hyperledger Fabric format (common.Policy). - Only required when I(state) is C(present). required: true type: raw