topology '<%= node['chef-server-12']['topology'] %>'
api_fqdn '<%= node['chef-server-12']['api_fqdn'] %>'
nginx['server_name'] = '<%= node['chef-server-12']['api_fqdn'] %>'

<%
if node['chef-server-12']['analytics'] || node['chef-server-12']['supermarket']
  @applications = {}
  @applications.merge!({
    analytics: {
      redirect_uri: "https://#{node['chef-server-12']['analytics']['fqdn']}/"
    }
  }) if node['chef-server-12']['analytics']
  @applications.merge!({
    supermarket: {
      redirect_uri: "https://#{node['chef-server-12']['supermarket']['fqdn']}/auth/chef_oauth2/callback"
    }
  }) if node['chef-server-12']['supermarket']
%>
oc_id['applications'] = <%= @applications.inspect -%>

<%  if node['chef-server-12']['analytics'] -%>
rabbitmq['vip'] = '<%= node['chef-server-12']['api_fqdn'] %>'
rabbitmq['node_ip_address'] = '0.0.0.0'
<%  end -%>
<% end -%>

topology '<%= node['chef-server-12']['topology'] %>'
api_fqdn '<%= node['chef-server-12']['api_fqdn'] %>'
nginx['server_name'] = '<%= node['chef-server-12']['api_fqdn'] %>'

<%
if node['chef-server-12']['analytics'] || node['chef-server-12']['supermarket']
  @applications = {}
  @applications.merge!({
    analytics: {
      redirect_uri: "https://#{node['chef-server-12']['analytics']['fqdn']}/"
    }
  }) if node['chef-server-12']['analytics']
  @applications.merge!({
    supermarket: {
      redirect_uri: "https://#{node['chef-server-12']['supermarket']['fqdn']}/auth/chef_oauth2/callback"
    }
  }) if node['chef-server-12']['supermarket']
%>
oc_id['vip'] = 'localhost'
oc_id['applications'] = <%= @applications.inspect -%>

<%  if node['chef-server-12']['analytics'] -%>
rabbitmq['vip'] = '<%= node['chef-server-12']['api_fqdn'] %>'
rabbitmq['node_ip_address'] = '0.0.0.0'
<%  end -%>
<% end -%>

Add `oc_id['vip']` to chef-server config
Add `oc_id['vip']` to chef-server config

In Chef Server 12 if /etc/hosts has localhost resolving to both IPv4
and IPv6 IP addresses then rails will bind to the IPv6 address.
This breaks access to OC-ID because oc_id['vip'] currently defaults to
127.0.0.1 which breaks OAuth login for Supermarket and Analytics servers

This commit adds `oc_id['vip'] = 'localhost'` to fix the above
