How to execute the Task in workflow after the deployment is completed

We have a custom blueprint to deploy the kubernetes cluster. When we kickoff the builds it will deploy the Master and Worker nodes, after the completing the deployment, it will deploy the registry node and executes the task defined in workflow attached in automation, but after the registry node is deployed, I need scripts to execute on the Masternode which is already deployed. Can someone guide me how to execute the scripts in Masternode after whole deployment is completed