Possible error in documentation for creating /etc/gitlab/gitlab.rb
Hello,
While trying to upgrade a source 8.9.4 installation to an omnibus installation, I encountered the error below while trying to run sudo gitlab-ctl reconfigure
:
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================
SyntaxError
-----------
/etc/gitlab/gitlab.rb:5: syntax error, unexpected =>, expecting '}'
git_data_dirs {'default'=>'/home/git/'}
^
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:35:in `from_file'
Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:
28: group "root"
29: mode "0775"
30: action :nothing
31: end.run_action(:create)
32:
33: Gitlab[:node] = node
34: if File.exists?("/etc/gitlab/gitlab.rb")
35>> Gitlab.from_file("/etc/gitlab/gitlab.rb")
36: end
37: node.consume_attributes(Gitlab.generate_config(node['fqdn']))
38:
39: if File.exists?("/var/opt/gitlab/bootstrapped")
40: node.set['gitlab']['bootstrap']['enable'] = false
41: end
42:
43: directory "/var/opt/gitlab" do
44: owner "root"
Running handlers:
Running handlers complete
Chef Client failed. 0 resources updated in 01 seconds
I used the following to create the /etc/gitlab/gitlab.rb
file:
sudo mkdir /etc/gitlab
sudo tee -a /etc/gitlab/gitlab.rb <<'EOF'
external_url 'http://gitlab.example.com'
git_data_dirs { 'default' => '/home/git' }
postgresql['enable'] = false
gitlab_rails['db_host'] = '/var/run/postgresql/'
gitlab_rails['db_port'] = 5432
gitlab_rails['db_username'] = 'git'
EOF
I hade to change git_data_dirs { 'default' => '/home/git' }
on line 4 to git_data_dirs { '/home/git' }
before it worked.
Is this an error or a version specific issue?
Cheers