Pass environment variables to exmaple.py

Use another way to check whether to use environment variables.
Use the env value even if it is None as long as the key exists
so an empty role list can trigger role auto assignment.

Change-Id: Ifb2993e4d71c7e58aacd39e1a4782040bbc11885
Merge "Pass environment variables to exmaple.py"