Gitlab.rb configuration question - interpolation in external_url

Hi Community,

I am building a gitlab environment custom image for a cloud environement, and want to implement such that gitlab can intelligently findout what the current hostname is and start itself.

Now the below is working if I hard code the hostname
external_url http://test-server-1

I see this #{node[‘fqdn’]} is being use as an example in gitlab.rb file, for example -

user[‘git_user_email’] = “gitlab@#{node[‘fqdn’]}”

nginx[‘ssl_certificate’] = “/etc/gitlab/ssl/#{node[‘fqdn’]}.crt”

nginx[‘ssl_certificate_key’] = “/etc/gitlab/ssl/#{node[‘fqdn’]}.key”

In addition, I see this post with gitlab_omnibus installation saying, quote - “… GitLab will be
installed and configured with external_url set to https://#{node[‘fqdn’]}”

However, I have tried all the following none of them is working -
external_url “https://#{node[‘fqdn’]}”
external_url = “https://#{node[‘fqdn’]}”

I am not good a ruby but I suspect this is probably because ruby do not allow interpolation in url? Is there a way to workaround this instead of hard code the hostname in external_url?

Thanks in advance for any replies.