Problems relocating $confdir on Puppet Master

309 views
Skip to first unread message

Dan White

unread,
May 2, 2013, 8:38:42 AM5/2/13
to Puppet Users Mailing List
Reference: http://www.mail-archive.com/puppet...@googlegroups.com/msg41278.html

Still having issues.

Even if I explicitly set confdir in the command line:

puppet agent --no-daemonize --onetime --test --noop --no-report --confdir=/etc/puppet

Manifests containing %{::settings::confdir} give me the value from the puppet-master even though the command

puppet config print confdir

on the agent returns /etc/puppet

I guess it boils does to how does one access settings on the local agent in the manifests ?

“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

Denmat

unread,
May 2, 2013, 6:30:27 PM5/2/13
to puppet...@googlegroups.com
Well that kinda makes sense for the top scope variable on the master to return like that. Your options would be like any other fact/var you want to query on the client, no?

Den
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
> To post to this group, send email to puppet...@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Dan White

unread,
May 2, 2013, 9:00:24 PM5/2/13
to puppet...@googlegroups.com
How do I do it ?

I tried ...
confdir
::confdir
settings::confdir
and
::settings::confdir

Dan White

unread,
May 3, 2013, 8:30:28 PM5/3/13
to puppet...@googlegroups.com
I figured it out ! Short answer: Cannot be done without customization.

http://docs.puppetlabs.com/puppet/3/reference/lang_variables.html#facts-and-built-in-variables
Master-Set Variables :
$settings::<name of setting> — the value of any of the master’s configuration settings. This is implemented as a special namespace and these variables must be referred to by their qualified names. Note that, other than $environment, the agent node’s settings are not available in manifests. If you wish to expose them to the master in Puppet 3, you will have to create a custom fact.

So I am going to make a top or node level variable that I will load with hiera !
Reply all
Reply to author
Forward
0 new messages