Skip to content
Snippets Groups Projects
Commit 0b215c92d517 authored by DJ Mountney's avatar DJ Mountney
Browse files

Merge branch...

Merge branch '6446-patroni-not-generating-public_attributes-when-patroni_role-is-enabled' into 'master'

Conditionally generate public_attributes.json

Closes #6446

See merge request gitlab-org/omnibus-gitlab!5674
No related branches found
No related tags found
2 merge requests!55Intermediate build after shift of stable series,!54GitLab 14.4
{
"run_list": [ "recipe[<%= master_cookbook %>]" ]
"run_list": [ "recipe[<%= master_cookbook %>]" ],
"package": {
"public_attributes": true
}
}
......@@ -26,6 +26,10 @@
default['package']['systemd_wanted_by'] = 'multi-user.target'
default['package']['systemd_after'] = 'multi-user.target'
# We only want to generate the public attributes file on specific calls to Chef.
# Normally, you will not want to change this
default['package']['public_attributes'] = false
# Setting runit defaults here so that they can be made available automatically
# to cookbooks of individual services via depends in metadata.rb
default['runit']['sv_bin'] = '/opt/gitlab/embedded/bin/sv'
......
......@@ -34,6 +34,8 @@
class Attributes < Chef::Handler
# Generate a JSON file of attributes which non-root users need access to
def report
return unless node['package']['public_attributes']
data = {}
BaseHelper.descendants.each do |klass|
k = klass.send(:new, node)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment