IBM-Blockchain / ansible-collection

Ansible collection for building Hyperledger Fabric networks
Apache License 2.0
43 stars 38 forks source link

Remove operation parameter from peer_channel module (resolves #269) #554

Closed sstone1 closed 3 years ago

sstone1 commented 3 years ago

The operation parameter in the peer_channel module only has one option, join.

Remove the operation parameter from this module and make it like any other Ansible module by having a state parameter instead. When state is set to present, ensure that the peer is joined into the specified channel. When state is set to absent, ensure that the peer is not joined into the specified channel.

Because peers can't currently leave a channel, attempting this will throw an error, but this is on the Hyperledger Fabric roadmap and can be added at a later date.

These changes are compatible because any existing operation parameters will be ignored, and the state parameter defaults to present, preserving existing behaviour.

Signed-off-by: Simon Stone sstone1@uk.ibm.com