diff --git a/files/gitlab-cookbooks/gitlab/libraries/gitlab.rb b/files/gitlab-cookbooks/gitlab/libraries/gitlab.rb index 0da339a..4d0c66d 100644 --- a/files/gitlab-cookbooks/gitlab/libraries/gitlab.rb +++ b/files/gitlab-cookbooks/gitlab/libraries/gitlab.rb @@ -21,7 +21,7 @@ require 'chef/json_compat' require 'chef/mixin/deep_merge' require 'securerandom' -module GitLab +module Gitlab extend(Mixlib::Config) bootstrap Mash.new @@ -43,18 +43,18 @@ module GitLab end existing_secrets.each do |k, v| v.each do |pk, p| - GitLab[k][pk] = p + Gitlab[k][pk] = p end end - GitLab['postgresql']['sql_password'] ||= generate_hex(50) + Gitlab['postgresql']['sql_password'] ||= generate_hex(50) if File.directory?("/etc/gitlab") File.open("/etc/gitlab/gitlab-secrets.json", "w") do |f| f.puts( Chef::JSONCompat.to_json_pretty({ 'postgresql' => { - 'sql_password' => GitLab['postgresql']['sql_password'], + 'sql_password' => Gitlab['postgresql']['sql_password'], }, }) ) @@ -71,7 +71,7 @@ module GitLab "postgresql" ].each do |key| rkey = key.gsub('_', '-') - results['gitlab'][rkey] = GitLab[key] + results['gitlab'][rkey] = Gitlab[key] end results diff --git a/files/gitlab-cookbooks/gitlab/recipes/default.rb b/files/gitlab-cookbooks/gitlab/recipes/default.rb index 686c0bc..9194260 100644 --- a/files/gitlab-cookbooks/gitlab/recipes/default.rb +++ b/files/gitlab-cookbooks/gitlab/recipes/default.rb @@ -26,11 +26,11 @@ directory "/etc/gitlab" do action :nothing end.run_action(:create) -GitLab[:node] = node +Gitlab[:node] = node if File.exists?("/etc/gitlab/gitlab.rb") - GitLab.from_file("/etc/gitlab/gitlab.rb") + Gitlab.from_file("/etc/gitlab/gitlab.rb") end -node.consume_attributes(GitLab.generate_config(node['fqdn'])) +node.consume_attributes(Gitlab.generate_config(node['fqdn'])) if File.exists?("/var/opt/gitlab/bootstrapped") node.set['gitlab']['bootstrap']['enable'] = false -- libgit2 0.21.2