Register Variable from docker-compose container

Hey i just have a quick question. I need to export a tsig-keygen output from a docker-compose container. This output needs to be registered in a var. This var needs to be used later in my playbook to be put into a writen file.