However, I also need to populate the roledefs for that environment. My issue is that the environment is required to populate the roledefs. However, if I try and call the function to do that before the task that sets the environment, I don't know what the environment is yet. Conversely, if I try and populate the roledefs later, in the task that sets the environment, fabric complains "The following specified roles do not exist:".
This example below is where I attempt to set the roledefs after/during the task, and fabric complains with "The following specified roles do not exist:".