I like to use atop at the first step during investigation : https://www.atoptool.nl/
Just for you to known, they store the compose file. It’s in their compose folder on the data volume.
I think the idea to register the leader status during a dedicated task like Matt said is the better move.
You got this module if you want to create dynamic group during play :
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/add_host_module.html
And during gather_facts, you could add your own custom facts :
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_vars_facts.html#adding-custom-facts
Bash script example returning json :
#!/bin/bash
leader_status=$(curl http://127.0.0.1/leader_status)
echo {\"leader\" : \"${leader_status}\"}
Not sure if i really get what you are trying to do but you can check for the pre_task keyword. It’s seems you are overengineering something. Try to think about idempotency
They will don’t care, not their money, not their job. Can’t blame them
So happy to get the chance to see them at Jazz à Vienne in France, with Hania Rani as a second part.
It’s a great festival : https://www.jazzavienne.com/en
You will never find a tool to manage everything. It’s better to understand the pro and cons of each. The ability to use a real programming language is really the game changer of these new IaC tools (cdk / pulumi). You get a lot more momentum to involve others (devs) and share knowledges. If you don’t find value in that, you have no reason to switch, you will lose the terraform massive ecosystem.
For me, it give me the real opportunity to progress on my coding skills in association with my ops/infra routine. It’s a lot more fun than any hcl.
It’s not mandatory to use pulumi cloud, you can selfhost, or use any object storage backend.
Don’t think git as a sync storage, more like to merge works.
If you need to share files between computers use a shared storage.
Always use the right tool for the job. Mount a shared storage or use synctools rsync, etc