Skip to content
Snippets Groups Projects
Commit 495de44fca4f authored by Ian Baum's avatar Ian Baum
Browse files

Don't generate public_attributes.json on non-reconfigure runs

* Adds a conditional (default false) to generate the
  public_attributes.json file. We only want to do this for a full
reconfigure run (which uses dna.json).

Changelog: fixed
parent 42c815dee8fd
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