defaults.rb should set Puppet[:config] to /etc/puppet/puppet.conf if user is puppet
|Affected Puppet version:||0.24.8||Branch:|
The below code from defaults.rb always sets the puppet.conf location to be ~/.puppet/puppet.conf for the puppet user (who is also the calling user for external node classifiers).
This makes it impossible to use the parse_config call to grab config information in the node classifier.
as a work around, I had to do the following #ln -s /etc/puppet/puppet.conf /root/.puppet/puppet.conf
if name != "puppetmasterd" and Puppet::Util::SUIDManager.uid != 0 conf = File.expand_path("~/.puppet") var = File.expand_path("~/.puppet/var") else conf = "/etc/puppet" var = "/var/puppet" end
#1 Updated by Luke Kanies about 4 years ago
- Status changed from Unreviewed to Accepted
- Target version set to 2.6.0
This is too big of a change to get into 0.25.1.
Getting this stuff right is always hard — our service user might not actually be ‘puppet’, so we can’t just hard-code that.
Really, we need code as a default, so we can have logic to produce the right value depending on context.