Apologies for the slow response here. The
execute_command will pass the variable information after the build process, at provision time for each provisioner. So the shared file must exist prior to running the first provisioner that needs to read that file.
If in your build step, guessing via some init script or user data script, the file is created the provisioner with the custom
execute_command would run after the build and load the shared file at the time of execution; a custom
execute_command will need to be set for each proivisioner that would require access to the shared env file.
If you plan on using a provisioner to create or update the file then any changes to the shared var file would only be available to subsequent provisioners using the custom