It looks like there is a disconnect between the variables set here and the variables used in metadata_agent.ini.erb.  Comparing the variables, it appears that metadata_agent.ini is expecting service_user, service_password, and auth_region, which are not set below.  Likewise, admin_user and admin_password are set below, but are not used in metadata_agent.ini.