Moving variables from workload to module

I would like to bring variables from workload to module, could you please suggest how to do?