In my rails application, I exported my database variables in .profile using ansible. the variables are accessible by the command printenv. However,
.profile
printenv