elastic / ansible-elasticsearch

Ansible playbook for Elasticsearch
Other
1.58k stars 854 forks source link

Migrate to Ansible collection #775

Closed bndabbs closed 3 years ago

bndabbs commented 3 years ago

This issue will be used to track efforts to move to an Ansible collection where we can eventually provide roles for each stack component along with some dedicated modules.

I have started created some initial content towards the effort here. The final namespace and collection name are subject to change.

Bernhard-Fluehmann commented 3 years ago

@bndabbs This looks great! IMHO it would be great to support uninstall and rolling-upgrade as well. E.g. with a state variable like present,absent,latest.

bndabbs commented 3 years ago

Thanks, @Bernhard-Fluehmann. That is definitely something I'm considering how to best support. I am not sure at this point if that will be a part of the roles, or just a supporting playbook.

Bernhard-Fluehmann commented 3 years ago

Nice to hear @bndabbs. Uninstall should be pretty straight forward, using the e.g. yum modules and optionally deleting some directories. The main part of rolling upgrade is as well using like yum to upgrade in serial mode plus doing some pre and post actions and waiting until the cluster state recovers between each node upgrade. I have implemented it in a separate task file. I'm sure you will come up with a great solution. All I hope that as less tags as possible are involved, since for me tags can be a real pain and there seem to be no way to set them unless in the command line itself. What I started with myself is to create task-files and use tasks_from to pick them. Again, somehow a state based solution would be very nice IMHO, since this would be easy to understand and how a lot of modules work. Please keep me updated and let me know if I can assist you in any way. I would like to use the collection as soon as possible and migrate all of our different roles to it.

Timoses commented 3 years ago

Is there any progress regarding moving to collection?