The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #2644

defaults.rb should set Puppet[:config] to /etc/puppet/puppet.conf if user is puppet

Added by defunt Bode about 5 years ago. Updated over 1 year ago.

Status:AcceptedStart date:09/16/2009
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:package
Target version:-
Affected Puppet version:0.24.8 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


Description

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

History

#1 Updated by Luke Kanies about 5 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.

#2 Updated by James Turnbull over 4 years ago

  • Target version changed from 2.6.0 to 2.7.x

#3 Updated by Andrew Parker over 1 year ago

  • Target version deleted (2.7.x)

Also available in: Atom PDF