def serial_work(single_node_work, params): with settings(**params): return execute(serial(single_node_work), hosts=params['public_ips'].values())