Ansible for etcd - roles, user, role-based authentication

I am aware of the community.general.etcd3 module, which apparently only has a narrow set of abilities.

Sets or deletes values in etcd3 cluster using its v3 API.

I want to use etcd3 for managing postgres via Patroni, so the setting of values in etcd is not my concern, because that is handled by Patroni.

What I currently need to achieve is setting up roles, users and role-based authentication for my running etcd-cluster.

I guess this can be achieved via shell and/or command (*) TASKS but I was wondering whether there is a more ansible-ish way to approach this.

(*)
etcdctl role add ...
etcdctl user add ...
etcdctl role grant-permission ...
etcdctl --user root auth enable

Hi @dulhaver

Yes, you could go the approach of the command module as you mentioned. Another option be to look into using the etcd gRPC API and interact with that via a gRPC Python library in your own module.

thx. I am not capable of that I’m afraid. Will go with the command/shell approach then for now.