diff --git a/roles/debian/gitlab/defaults/main.yml b/roles/debian/gitlab/defaults/main.yml index ba7d1b4e5..225d7a2cf 100644 --- a/roles/debian/gitlab/defaults/main.yml +++ b/roles/debian/gitlab/defaults/main.yml @@ -11,6 +11,7 @@ gitlab: apt_origin: "origin=packages.gitlab.com/gitlab/gitlab-ce,codename=${distro_codename},label=gitlab-ce" # used by apt_unattended_upgrades apt_signed_by: https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey server_name: "gitlab.{{ _domain_name }}" + ssh_url: "" # custom SSH URL. Similar to https one if empty. force_stop: true # whether to stop GitLab to reconfigure or not # Add a record for GitLab in AWS Route 53 # If you use the aws_ec2_with_eip role to create your server this will not be necessary diff --git a/roles/debian/gitlab/templates/gitlab.rb.j2 b/roles/debian/gitlab/templates/gitlab.rb.j2 index 18714deaf..b31c6f6d3 100644 --- a/roles/debian/gitlab/templates/gitlab.rb.j2 +++ b/roles/debian/gitlab/templates/gitlab.rb.j2 @@ -47,7 +47,11 @@ external_url 'https://{{ gitlab.server_name }}' ## gitlab.yml configuration ##! Docs: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/gitlab.yml.md ################################################################################ +{% if (gitlab.ssh_url | length > 0) %} +gitlab_rails['gitlab_ssh_host'] = {{ gitlab.ssh_url }}" +{% else %} # gitlab_rails['gitlab_ssh_host'] = 'ssh.host_example.com' +{% endif %} # gitlab_rails['time_zone'] = 'UTC' ### Email Settings